UNPKG

@verified-network/verified-sdk

Version:

An SDK to develop applications on the Verified Network

753 lines (752 loc) 408 kB
{ "contractName": "Rates", "abi": [ { "constant": false, "inputs": [], "name": "initialize", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "name": "feeTo", "type": "address" }, { "name": "fee", "type": "uint256" }, { "name": "feeType", "type": "bytes32" } ], "name": "setFeeTo", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [ { "name": "feeType", "type": "bytes32" } ], "name": "getFee", "outputs": [ { "name": "fee", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [ { "name": "_feeToSetter", "type": "address" } ], "name": "setFeeToSetter", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "name": "_custodian", "type": "address" } ], "name": "setCustodian", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], "name": "getFeeToSetter", "outputs": [ { "name": "", "type": "address" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "getCustodian", "outputs": [ { "name": "", "type": "address" } ], "payable": false, "stateMutability": "view", "type": "function" } ], "metadata": "{\"compiler\":{\"version\":\"0.5.7+commit.6da8b019\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":false,\"inputs\":[{\"name\":\"_custodian\",\"type\":\"address\"}],\"name\":\"setCustodian\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"feeTo\",\"type\":\"address\"},{\"name\":\"fee\",\"type\":\"uint256\"},{\"name\":\"feeType\",\"type\":\"bytes32\"}],\"name\":\"setFeeTo\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"initialize\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_feeToSetter\",\"type\":\"address\"}],\"name\":\"setFeeToSetter\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getCustodian\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"feeType\",\"type\":\"bytes32\"}],\"name\":\"getFee\",\"outputs\":[{\"name\":\"fee\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getFeeToSetter\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"project:/contracts/Rates.sol\":\"Rates\"},\"evmVersion\":\"petersburg\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/upgrades/contracts/Initializable.sol\":{\"keccak256\":\"0x9bfec92e36234ecc99b5d37230acb6cd1f99560233753162204104a4897e8721\",\"urls\":[\"bzzr://f75d88b16fe25a9e19b3512691c496e2bb6d8451bc9a636196c4e17ca9b40201\"]},\"project:/contracts/Rates.sol\":{\"keccak256\":\"0xe48e2ba01b5a6c5b67a5005fb4b230663dfc860ef92f822320e71035ea182779\",\"urls\":[\"bzzr://f4b024b4a7d526cbd1d0a6d9d62722b34dd3fc899f68068209a139017dbb391d\"]},\"project:/contracts/interfaces/VerifiedRates.sol\":{\"keccak256\":\"0x5c637fe1bca7c152e7fc41237459b65b6147632ad110c747584a6566424cb8da\",\"urls\":[\"bzzr://e9647e2e2b1768908061c2ea083d26bd9b2b764f91b5bc49207f3d30696a7a0c\"]}},\"version\":1}", "bytecode": "0x608060405234801561001057600080fd5b506105a5806100206000396000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c8063a2e74af61161005b578063a2e74af6146100e4578063c561d4b71461010a578063e5f3d3a51461012e578063f4aa13021461015d5761007d565b8063403f373114610082578063501e33fa146100aa5780638129fc1c146100dc575b600080fd5b6100a86004803603602081101561009857600080fd5b50356001600160a01b0316610165565b005b6100a8600480360360608110156100c057600080fd5b506001600160a01b0381351690602081013590604001356101d6565b6100a8610308565b6100a8600480360360208110156100fa57600080fd5b50356001600160a01b03166103cf565b610112610440565b604080516001600160a01b039092168252519081900360200190f35b61014b6004803603602081101561014457600080fd5b503561044f565b60408051918252519081900360200190f35b61011261050c565b60355433906001600160a01b031681146101b357604051600160e51b62461bcd02815260040180806020018281038252602a815260200180610522602a913960400191505060405180910390fd5b50603680546001600160a01b0319166001600160a01b0392909216919091179055565b60355433906001600160a01b0316811461022457604051600160e51b62461bcd02815260040180806020018281038252602a815260200180610522602a913960400191505060405180910390fd5b81600160c81b6669737375696e67021415610259576001600160a01b0384166000908152603460205260409020839055610302565b81600160b11b693932b232b6b83a34b7b7021415610294576001600160a01b0384166000908152603460205260409020600101839055610302565b81600160b01b6972656d697474616e63650214156102cc576001600160a01b0384166000908152603360205260409020839055610302565b81600160ba1b681dda5d1a191c985ddb021415610302576001600160a01b03841660009081526033602052604090206001018390555b50505050565b600054610100900460ff1680610321575061032161051b565b8061032f575060005460ff16155b61036d57604051600160e51b62461bcd02815260040180806020018281038252602e81526020018061054c602e913960400191505060405180910390fd5b600054610100900460ff16158015610398576000805460ff1961ff0019909116610100171660011790555b60358054336001600160a01b0319918216811790925560368054909116909117905580156103cc576000805461ff00191690555b50565b60355433906001600160a01b0316811461041d57604051600160e51b62461bcd02815260040180806020018281038252602a815260200180610522602a913960400191505060405180910390fd5b50603580546001600160a01b0319166001600160a01b0392909216919091179055565b6036546001600160a01b031690565b600081600160c81b6669737375696e6702141561047c575033600090815260346020526040902054610507565b81600160b11b693932b232b6b83a34b7b70214156104ad575033600090815260346020526040902060010154610507565b81600160b01b6972656d697474616e63650214156104db575033600090815260336020526040902054610507565b81600160ba1b681dda5d1a191c985ddb0214156105075750336000908152603360205260409020600101545b919050565b6035546001600160a01b031690565b303b159056fe556e617574686f72697a65642061636365737320666f72206665652061646d696e697374726174696f6e436f6e747261637420696e7374616e63652068617320616c7265616479206265656e20696e697469616c697a6564a165627a7a7230582090e33951e9cfe08e0f86fcb9cd3154ff5b7e495c1a4d434fabaed9ca99ada38f0029", "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061007d5760003560e01c8063a2e74af61161005b578063a2e74af6146100e4578063c561d4b71461010a578063e5f3d3a51461012e578063f4aa13021461015d5761007d565b8063403f373114610082578063501e33fa146100aa5780638129fc1c146100dc575b600080fd5b6100a86004803603602081101561009857600080fd5b50356001600160a01b0316610165565b005b6100a8600480360360608110156100c057600080fd5b506001600160a01b0381351690602081013590604001356101d6565b6100a8610308565b6100a8600480360360208110156100fa57600080fd5b50356001600160a01b03166103cf565b610112610440565b604080516001600160a01b039092168252519081900360200190f35b61014b6004803603602081101561014457600080fd5b503561044f565b60408051918252519081900360200190f35b61011261050c565b60355433906001600160a01b031681146101b357604051600160e51b62461bcd02815260040180806020018281038252602a815260200180610522602a913960400191505060405180910390fd5b50603680546001600160a01b0319166001600160a01b0392909216919091179055565b60355433906001600160a01b0316811461022457604051600160e51b62461bcd02815260040180806020018281038252602a815260200180610522602a913960400191505060405180910390fd5b81600160c81b6669737375696e67021415610259576001600160a01b0384166000908152603460205260409020839055610302565b81600160b11b693932b232b6b83a34b7b7021415610294576001600160a01b0384166000908152603460205260409020600101839055610302565b81600160b01b6972656d697474616e63650214156102cc576001600160a01b0384166000908152603360205260409020839055610302565b81600160ba1b681dda5d1a191c985ddb021415610302576001600160a01b03841660009081526033602052604090206001018390555b50505050565b600054610100900460ff1680610321575061032161051b565b8061032f575060005460ff16155b61036d57604051600160e51b62461bcd02815260040180806020018281038252602e81526020018061054c602e913960400191505060405180910390fd5b600054610100900460ff16158015610398576000805460ff1961ff0019909116610100171660011790555b60358054336001600160a01b0319918216811790925560368054909116909117905580156103cc576000805461ff00191690555b50565b60355433906001600160a01b0316811461041d57604051600160e51b62461bcd02815260040180806020018281038252602a815260200180610522602a913960400191505060405180910390fd5b50603580546001600160a01b0319166001600160a01b0392909216919091179055565b6036546001600160a01b031690565b600081600160c81b6669737375696e6702141561047c575033600090815260346020526040902054610507565b81600160b11b693932b232b6b83a34b7b70214156104ad575033600090815260346020526040902060010154610507565b81600160b01b6972656d697474616e63650214156104db575033600090815260336020526040902054610507565b81600160ba1b681dda5d1a191c985ddb0214156105075750336000908152603360205260409020600101545b919050565b6035546001600160a01b031690565b303b159056fe556e617574686f72697a65642061636365737320666f72206665652061646d696e697374726174696f6e436f6e747261637420696e7374616e63652068617320616c7265616479206265656e20696e697469616c697a6564a165627a7a7230582090e33951e9cfe08e0f86fcb9cd3154ff5b7e495c1a4d434fabaed9ca99ada38f0029", "sourceMap": "259:2556:19:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;259:2556:19;;;;;;;", "deployedSourceMap": "259:2556:19:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;259:2556:19;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2355:125;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2355:125:19;-1:-1:-1;;;;;2355:125:19;;:::i;:::-;;1156:500;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;1156:500:19;;;;;;;;;;;;;:::i;1032:116::-;;;:::i;2212:133::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2212:133:19;-1:-1:-1;;;;;2212:133:19;;:::i;2721:89::-;;;:::i;:::-;;;;-1:-1:-1;;;;;2721:89:19;;;;;;;;;;;;;;1702:502;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1702:502:19;;:::i;:::-;;;;;;;;;;;;;;;;2554:93;;;:::i;2355:125::-;946:11;;2410:10;;-1:-1:-1;;;;;946:11:19;936:21;;928:76;;;;-1:-1:-1;;;;;928:76:19;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2450:9:19;:22;;-1:-1:-1;;;;;;2450:22:19;-1:-1:-1;;;;;2450:22:19;;;;;;;;;;2355:125::o;1156:500::-;946:11;;1232:10;;-1:-1:-1;;;;;946:11:19;936:21;;928:76;;;;-1:-1:-1;;;;;928:76:19;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1267:7;-1:-1:-1;;;;;1267:18:19;1264:385;;;-1:-1:-1;;;;;1301:18:19;;;;;;:11;:18;;;;;:32;;;1264:385;;;1363:7;-1:-1:-1;;;;;1363:21:19;1360:289;;;-1:-1:-1;;;;;1400:18:19;;;;;;:11;:18;;;;;:29;;:35;;;1360:289;;;1465:7;-1:-1:-1;;;;;1465:21:19;1462:187;;;-1:-1:-1;;;;;1502:18:19;;;;;;:11;:18;;;;;:35;;;1462:187;;;1567:7;-1:-1:-1;;;;;1567:20:19;1564:85;;;-1:-1:-1;;;;;1603:18:19;;;;;;:11;:18;;;;;:28;;:34;;;1564:85;1156:500;;;;:::o;1032:116::-;1024:12:4;;;;;;;;:31;;;1040:15;:13;:15::i;:::-;1024:47;;;-1:-1:-1;1060:11:4;;;;1059:12;1024:47;1016:106;;;;-1:-1:-1;;;;;1016:106:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1129:19;1152:12;;;;;;1151:13;1170:80;;;;1198:12;:19;;-1:-1:-1;;;;1198:19:4;;;;;1225:18;1213:4;1225:18;;;1170:80;1083:11:19;:24;;1097:10;-1:-1:-1;;;;;;1083:24:19;;;;;;;;1118:9;:22;;;;;;;;;;1264:55:4;;;;1307:5;1292:20;;-1:-1:-1;;1292:20:4;;;1264:55;1032:116:19;:::o;2212:133::-;946:11;;2271:10;;-1:-1:-1;;;;;946:11:19;936:21;;928:76;;;;-1:-1:-1;;;;;928:76:19;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2311:11:19;:26;;-1:-1:-1;;;;;;2311:26:19;-1:-1:-1;;;;;2311:26:19;;;;;;;;;;2212:133::o;2721:89::-;2793:9;;-1:-1:-1;;;;;2793:9:19;2721:89;:::o;1702:502::-;1757:11;1783:7;-1:-1:-1;;;;;1783:18:19;1780:417;;;-1:-1:-1;1837:10:19;1825:23;;;;:11;:23;;;;;:31;1817:40;;1780:417;1887:7;-1:-1:-1;;;;;1887:21:19;1884:313;;;-1:-1:-1;1944:10:19;1932:23;;;;:11;:23;;;;;:34;;;1924:43;;1884:313;1997:7;-1:-1:-1;;;;;1997:21:19;1994:203;;;-1:-1:-1;2054:10:19;2042:23;;;;:11;:23;;;;;:34;2034:43;;1994:203;2107:7;-1:-1:-1;;;;;2107:20:19;2104:93;;;-1:-1:-1;2163:10:19;2151:23;;;;:11;:23;;;;;:33;;;2104:93;1702:502;;;:::o;2554:93::-;2628:11;;-1:-1:-1;;;;;2628:11:19;2554:93;:::o;1409:498:4:-;1820:4;1864:17;1895:7;1409:498;:::o", "source": "// (c) Kallol Borah, 2020\r\n// Implementation of authorized persons and rates for services\r\n// SPDX-License-Identifier: BUSL\r\n\r\npragma solidity 0.5.7;\r\n\r\nimport \"./interfaces/VerifiedRates.sol\";\r\nimport \"@openzeppelin/upgrades/contracts/Initializable.sol\";\r\n\r\ncontract Rates is VerifiedRates, Initializable {\r\n\r\n //fee structure for payments\r\n struct payments{\r\n uint256 remittance;\r\n uint256 withdrawl;\r\n }\r\n\r\n mapping(address => payments) private paymentFees;\r\n\r\n //fee structure for bond and securities issuing\r\n struct issues{\r\n uint256 issuing;\r\n uint256 redemption;\r\n }\r\n\r\n mapping(address => issues) private issuingFees;\r\n\r\n //address of who gets Via fees\r\n address private feeToSetter;\r\n\r\n //address of custodian\r\n address private custodian;\r\n\r\n //mutex\r\n mapping(bytes32 => bool) private _lock;\r\n\r\n modifier onlyFeeAdmin(address sender){\r\n require(sender == feeToSetter, 'Unauthorized access for fee administration');\r\n _;\r\n }\r\n\r\n function initialize() public initializer{\r\n feeToSetter = msg.sender;\r\n custodian = msg.sender;\r\n }\r\n\r\n function setFeeTo(address feeTo, uint256 fee, bytes32 feeType) onlyFeeAdmin(msg.sender) external {\r\n if(feeType==\"issuing\"){\r\n issuingFees[feeTo].issuing = fee;\r\n }\r\n else if(feeType==\"redemption\"){\r\n issuingFees[feeTo].redemption = fee;\r\n }\r\n else if(feeType==\"remittance\"){\r\n paymentFees[feeTo].remittance = fee;\r\n }\r\n else if(feeType==\"withdrawl\"){\r\n paymentFees[feeTo].withdrawl = fee;\r\n }\r\n }\r\n\r\n //get fee for different services\r\n function getFee(bytes32 feeType) external view returns(uint256 fee){\r\n if(feeType==\"issuing\"){\r\n return (issuingFees[msg.sender].issuing);\r\n }\r\n else if(feeType==\"redemption\"){\r\n return (issuingFees[msg.sender].redemption);\r\n }\r\n else if(feeType==\"remittance\"){\r\n return (paymentFees[msg.sender].remittance);\r\n }\r\n else if(feeType==\"withdrawl\"){\r\n return (paymentFees[msg.sender].withdrawl);\r\n }\r\n }\r\n\r\n function setFeeToSetter(address _feeToSetter) onlyFeeAdmin(msg.sender) external { \r\n feeToSetter = _feeToSetter;\r\n } \r\n\r\n function setCustodian(address _custodian) onlyFeeAdmin(msg.sender) external { \r\n custodian = _custodian;\r\n } \r\n\r\n //gets address to which fee income has to be transferred\r\n function getFeeToSetter() external view returns(address){\r\n return feeToSetter;\r\n }\r\n\r\n //get Custodian address for transferring (backing up) assets\r\n function getCustodian() external view returns(address){\r\n return custodian;\r\n }\r\n\r\n}", "sourcePath": "D:\\Code\\verified-payments\\contracts\\Rates.sol", "ast": { "absolutePath": "project:/contracts/Rates.sol", "exportedSymbols": { "Rates": [ 7564 ] }, "id": 7565, "nodeType": "SourceUnit", "nodes": [ { "id": 7340, "literals": [ "solidity", "0.5", ".7" ], "nodeType": "PragmaDirective", "src": "127:22:19" }, { "absolutePath": "project:/contracts/interfaces/VerifiedRates.sol", "file": "./interfaces/VerifiedRates.sol", "id": 7341, "nodeType": "ImportDirective", "scope": 7565, "sourceUnit": 8062, "src": "153:40:19", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "@openzeppelin/upgrades/contracts/Initializable.sol", "file": "@openzeppelin/upgrades/contracts/Initializable.sol", "id": 7342, "nodeType": "ImportDirective", "scope": 7565, "sourceUnit": 479, "src": "195:60:19", "symbolAliases": [], "unitAlias": "" }, { "baseContracts": [ { "arguments": null, "baseName": { "contractScope": null, "id": 7343, "name": "VerifiedRates", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 8061, "src": "277:13:19", "typeDescriptions": { "typeIdentifier": "t_contract$_VerifiedRates_$8061", "typeString": "contract VerifiedRates" } }, "id": 7344, "nodeType": "InheritanceSpecifier", "src": "277:13:19" }, { "arguments": null, "baseName": { "contractScope": null, "id": 7345, "name": "Initializable", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 478, "src": "292:13:19", "typeDescriptions": { "typeIdentifier": "t_contract$_Initializable_$478", "typeString": "contract Initializable" } }, "id": 7346, "nodeType": "InheritanceSpecifier", "src": "292:13:19" } ], "contractDependencies": [ 478, 8061 ], "contractKind": "contract", "documentation": null, "fullyImplemented": true, "id": 7564, "linearizedBaseContracts": [ 7564, 478, 8061 ], "name": "Rates", "nodeType": "ContractDefinition", "nodes": [ { "canonicalName": "Rates.payments", "id": 7351, "members": [ { "constant": false, "id": 7348, "name": "remittance", "nodeType": "VariableDeclaration", "scope": 7351, "src": "375:18:19", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 7347, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "375:7:19", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 7350, "name": "withdrawl", "nodeType": "VariableDeclaration", "scope": 7351, "src": "404:17:19", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 7349, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "404:7:19", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "name": "payments", "nodeType": "StructDefinition", "scope": 7564, "src": "349:80:19", "visibility": "public" }, { "constant": false, "id": 7355, "name": "paymentFees", "nodeType": "VariableDeclaration", "scope": 7564, "src": "437:48:19", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_struct$_payments_$7351_storage_$", "typeString": "mapping(address => struct Rates.payments)" }, "typeName": { "id": 7354, "keyType": { "id": 7352, "name": "address", "nodeType": "ElementaryTypeName", "src": "445:7:19", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Mapping", "src": "437:28:19", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_struct$_payments_$7351_storage_$", "typeString": "mapping(address => struct Rates.payments)" }, "valueType": { "contractScope": null, "id": 7353, "name": "payments", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 7351, "src": "456:8:19", "typeDescriptions": { "typeIdentifier": "t_struct$_payments_$7351_storage_ptr", "typeString": "struct Rates.payments" } } }, "value": null, "visibility": "private" }, { "canonicalName": "Rates.issues", "id": 7360, "members": [ { "constant": false, "id": 7357, "name": "issuing", "nodeType": "VariableDeclaration", "scope": 7360, "src": "571:15:19", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 7356, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "571:7:19", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 7359, "name": "redemption", "nodeType": "VariableDeclaration", "scope": 7360, "src": "597:18:19", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 7358, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "597:7:19", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "name": "issues", "nodeType": "StructDefinition", "scope": 7564, "src": "547:76:19", "visibility": "public" }, { "constant": false, "id": 7364, "name": "issuingFees", "nodeType": "VariableDeclaration", "scope": 7564, "src": "631:46:19", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_struct$_issues_$7360_storage_$", "typeString": "mapping(address => struct Rates.issues)" }, "typeName": { "id": 7363, "keyType": { "id": 7361, "name": "address", "nodeType": "ElementaryTypeName", "src": "639:7:19", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Mapping", "src": "631:26:19", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_struct$_issues_$7360_storage_$", "typeString": "mapping(address => struct Rates.issues)" }, "valueType": { "contractScope": null, "id": 7362, "name": "issues", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 7360, "src": "650:6:19", "typeDescriptions": { "typeIdentifier": "t_struct$_issues_$7360_storage_ptr", "typeString": "struct Rates.issues" } } }, "value": null, "visibility": "private" }, { "constant": false, "id": 7366, "name": "feeToSetter", "nodeType": "VariableDeclaration", "scope": 7564, "src": "722:27:19", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 7365, "name": "address", "nodeType": "ElementaryTypeName", "src": "722:7:19", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "private" }, { "constant": false, "id": 7368, "name": "custodian", "nodeType": "VariableDeclaration", "scope": 7564, "src": "786:25:19", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 7367, "name": "address", "nodeType": "ElementaryTypeName", "src": "786:7:19", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "private" }, { "constant": false, "id": 7372, "name": "_lock", "nodeType": "VariableDeclaration", "scope": 7564, "src": "833:38:19", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", "typeString": "mapping(bytes32 => bool)" }, "typeName": { "id": 7371, "keyType": { "id": 7369, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "841:7:19", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "nodeType": "Mapping", "src": "833:24:19", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", "typeString": "mapping(bytes32 => bool)" }, "valueType": { "id": 7370, "name": "bool", "nodeType": "ElementaryTypeName", "src": "852:4:19", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } } }, "value": null, "visibility": "private" }, { "body": { "id": 7384, "nodeType": "Block", "src": "917:107:19", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 7379, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 7377, "name": "sender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7374, "src": "936:6:19", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "id": 7378, "name": "feeToSetter", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7366, "src": "946:11:19", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "936:21:19", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "556e617574686f72697a65642061636365737320666f72206665652061646d696e697374726174696f6e", "id": 7380, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "959:44:19", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_80a2faa9ae5285bc5e4dfa764441d2fd3d588a4b5128653500aaf68b2c1b7735", "typeString": "literal_string \"Unauthorized access for fee administration\"" }, "value": "Unauthorized access for fee administration" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_80a2faa9ae5285bc5e4dfa764441d2fd3d588a4b5128653500aaf68b2c1b7735", "typeString": "literal_string \"Unauthorized access for fee administration\"" } ], "id": 7376, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 13010, 13011 ], "referencedDeclaration": 13011, "src": "928:7:19", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 7381, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "928:76:19", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 7382, "nodeType": "ExpressionStatement", "src": "928:76:19" }, { "id": 7383, "nodeType": "PlaceholderStatement", "src": "1015:1:19" } ] }, "documentation": null, "id": 7385, "name": "onlyFeeAdmin", "nodeType": "ModifierDefinition", "parameters": { "id": 7375, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 7374, "name": "sender", "nodeType": "VariableDeclaration", "scope": 7385, "src": "902:14:19", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 7373, "name": "address", "nodeType": "ElementaryTypeName", "src": "902:7:19", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "901:16:19" }, "src": "880:144:19", "visibility": "internal" }, { "body": { "id": 7400, "nodeType": "Block", "src": "1072:76:19", "statements": [ { "expression": { "argumentTypes": null, "id": 7393, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 7390, "name": "feeToSetter", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7366, "src": "1083:11:19", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 7391, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 13007, "src": "1097:3:19", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 7392, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "1097:10:19", "typeDescriptions": {