@gooddollar/goodcontracts
Version:
GoodDollar Contracts
941 lines (940 loc) • 96.9 kB
JSON
{
"contractName": "FundManagerSetReserve",
"abi": [
{
"inputs": [
{
"internalType": "contract Avatar",
"name": "_avatar",
"type": "address"
},
{
"internalType": "address",
"name": "_fundmanager",
"type": "address"
},
{
"internalType": "address",
"name": "_reserve",
"type": "address"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"constant": true,
"inputs": [],
"name": "fundmanager",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "reserve",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [],
"name": "setReserve",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
}
],
"metadata": "{\"compiler\":{\"version\":\"0.5.16+commit.9c3226ce\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract Avatar\",\"name\":\"_avatar\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_fundmanager\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_reserve\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"constant\":true,\"inputs\":[],\"name\":\"fundmanager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"reserve\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"setReserve\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/Users/hadar/workspace/GoodDollar/GoodBootstrap/packages/contracts/stakingModel/contracts/dao/schemes/FundManagerSetReserve.sol\":\"FundManagerSetReserve\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/hadar/workspace/GoodDollar/GoodBootstrap/packages/contracts/contracts/dao/schemes/SchemeGuard.sol\":{\"keccak256\":\"0x32e1b2a172e2c22a6aa757bfcb0722cc67f64c5c2e48df3dec2737903516d565\",\"urls\":[\"bzz-raw://bee57a8eba08348e93a0c18f3ab534e67865c0fa27afe27f5cf234bd5f248915\",\"dweb:/ipfs/Qmd8aveHWcUkYWMyJrJRZPyVXj8MAMBfpBFo6g4Z2VJeo3\"]},\"/Users/hadar/workspace/GoodDollar/GoodBootstrap/packages/contracts/stakingModel/contracts/dao/schemes/FundManagerSetReserve.sol\":{\"keccak256\":\"0x6c69e241b67e5f409d60971a8802354c76076a7f25c97acad4a6a501bc9049da\",\"urls\":[\"bzz-raw://d836f49ae3842a666c97de2ffb8c48f866b344c9d138030c2ac7e9d5c799f6ee\",\"dweb:/ipfs/QmPmtr1QhmNJrhSotKnkN5s9tz1GmzpsgQYo2wwucZpTfh\"]},\"@daostack/arc/contracts/controller/Avatar.sol\":{\"keccak256\":\"0x4e4fb9d3bc21f42fbfc6a01e9f8aa483a59e9f447b0d604f55b587a81ec09ef4\",\"urls\":[\"bzz-raw://9d3c1c7575cf6075ea1d89921f09b9b8e322b208dacaf0446cd4f64506c999f0\",\"dweb:/ipfs/QmVGDDHAR2ByuQpbgV7BBKXGEAcbaWvejpEZYzHgaagBFK\"]},\"@daostack/arc/contracts/controller/ControllerInterface.sol\":{\"keccak256\":\"0x933e92612c90f292c7b59908958b003f1a13d90b97bed0572b566353c20974dc\",\"urls\":[\"bzz-raw://ce1fcf85b744fcce2dbd4205e3943e9b4ec36a5f0330d4bbf61e65f1a3e0e470\",\"dweb:/ipfs/QmUWiLkBDdekhpy93nTzBtxDHL6yNh6sTUM9G8VbsHcBzy\"]},\"@daostack/arc/contracts/controller/DAOToken.sol\":{\"keccak256\":\"0x9b213e4e3ceeffcfc1c962a43b70b8d763d8091a2dd713fc1989b97bb68786e6\",\"urls\":[\"bzz-raw://51d1d6e85fd90f45395a16b7a3c703c4636e836041f2a13f806e4222ef2e59c1\",\"dweb:/ipfs/QmQjeCeFf7TJzsYjT5scyZUDDixBA8Yy8YppgBuxcKPDnP\"]},\"@daostack/arc/contracts/globalConstraints/GlobalConstraintInterface.sol\":{\"keccak256\":\"0xc006c4591ec10b845a56e13f6791db2c428610953034686d52b2a934b6c8f36f\",\"urls\":[\"bzz-raw://19495cd88280e54d7ddcd043ffeff75e6d3777a0c42debcd61cae448e9497ea0\",\"dweb:/ipfs/QmYxWz7CgFmmddrcVXJKfob5Ktwykc2imNVUwLSR5WR8bJ\"]},\"@daostack/arc/contracts/libs/SafeERC20.sol\":{\"keccak256\":\"0xf6727d432f67046145b078f40c1cc4f6be7b0d12a6678ecaf457edf7550d244c\",\"urls\":[\"bzz-raw://5dba7734c4fed446c084a707761cbc66ba22b8b93ef53c8d4a22a76b6e271690\",\"dweb:/ipfs/QmP2VpPKUqLh4ZZs6LaxHVpCN1zCmiorygL9bMub4mbYCw\"]},\"@daostack/infra/contracts/Reputation.sol\":{\"keccak256\":\"0x3d226dac0fe7d758f0287fb28bc25fcec1f69d19888ae3a550fa49856d61c482\",\"urls\":[\"bzz-raw://8856852c8fe0ba1c9aab326f0a9a6e7f31a238de2778fa5188e6fc399f7eb352\",\"dweb:/ipfs/QmVH4ppR9Dk7v8yxaSgeArdMv9gBBVoQxEf4E3UsqQ4rY2\"]},\"openzeppelin-solidity/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x965012d27b4262d7a41f5028cbb30c51ebd9ecd4be8fb30380aaa7a3c64fbc8b\",\"urls\":[\"bzz-raw://1eb493553b27efd46c231a836a83ce50d215639feb97b4aac9f301d0fd034ff5\",\"dweb:/ipfs/QmbMdvSXcqGKxeeYvzF3VrWpoHQyVzMXBhzhAokF2Gdymv\"]},\"openzeppelin-solidity/contracts/ownership/Ownable.sol\":{\"keccak256\":\"0x980de387a1a020a498f53d00f89fecebb12c949a17e8f160093c0303ede2b786\",\"urls\":[\"bzz-raw://f07a2c393caa85f62f0aaa461e3edd50aa59371d4209778ba0558d7f8b4b856c\",\"dweb:/ipfs/QmeN3ZiYGSjCnQFeYaJNgoXjF9eDue1g3e9pqManRkeBtV\"]},\"openzeppelin-solidity/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0xba431353cb4fe70777ac026231eb5468e41aa1e81240a2b8136917acc5fff4dc\",\"urls\":[\"bzz-raw://f40c91ca270bdc9b156f339081a0fc2bbcf73cf5f62b8c73ba555df753ff6619\",\"dweb:/ipfs/QmT8y2VVjGaFdGphpcXrgvdPi2EgF9LuCDgJiJ89LvpFRV\"]},\"openzeppelin-solidity/contracts/token/ERC20/ERC20Burnable.sol\":{\"keccak256\":\"0xa3e68fd7f987c8fbdaf4867d428a69a15f3cf2f69709a5b0a0fbef750b0e6fbc\",\"urls\":[\"bzz-raw://50b1ff986d3b2793850a66c8429d9886fdfb134b1509b3e98714e3e2a71e24f5\",\"dweb:/ipfs/QmSQBYPeY9tbR3ciGRNQqvcWKnNiuxtVMq2MsPWpLwuGGm\"]},\"openzeppelin-solidity/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x079c4e23ee448f529e43bfa3c4e8fb4be52cd0318ee923a276835bedf45b93d8\",\"urls\":[\"bzz-raw://ee762ff5b7746e41d27dcbcea00c7a3034b58adb1b45ddadddb5b721aff450df\",\"dweb:/ipfs/QmdxqtgEFZjHCoiYyz6pUAQ5iBm7As25jcyEbZoTaAgyDa\"]},\"openzeppelin-solidity/contracts/utils/Address.sol\":{\"keccak256\":\"0x5c731061b804fa256fc8c05150eafe5d20b6bb94541a8f187912bf84f7033f34\",\"urls\":[\"bzz-raw://a3c2d9f046beebab7fb41b1b124a6a124a36f510f7c67365861402ac831bdc71\",\"dweb:/ipfs/QmUtASRgitregbKH83anopLtF9vFQe3BKeAjhUa6F7t9YV\"]}},\"version\":1}",
"bytecode": "0x608060405234801561001057600080fd5b5060405161043c38038061043c8339818101604052606081101561003357600080fd5b50805160208201516040909201519091906001600160a01b03811661009f576040805162461bcd60e51b815260206004820152601e60248201527f726573657276652063616e6e6f74206265206e756c6c20616464726573730000604482015290519081900360640190fd5b600080546001600160a01b039384166001600160a01b03199182161790915560018054928416928216929092179091556002805493909216921691909117905561034e806100ee6000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c80636ad84def14610046578063cd3293de1461006a578063ce0aa39314610072575b600080fd5b61004e61007c565b604080516001600160a01b039092168252519081900360200190f35b61004e61008b565b61007a61009a565b005b6000546001600160a01b031681565b6001546001600160a01b031681565b60025460408051638da5cb5b60e01b815290516000926001600160a01b031691638da5cb5b916004808301926020929190829003018186803b1580156100df57600080fd5b505afa1580156100f3573d6000803e3d6000fd5b505050506040513d602081101561010957600080fd5b505160008054600154604080516001600160a01b03928316602480830191909152825180830382018152604492830184526020810180516001600160e01b0316634e76640560e11b17815260025494516368db844d60e11b815296861660048801818152958716948801859052606488018990526080938801938452825160848901528251999a50958a169863d1b7089a98969792969495939260a4019190808383885b838110156101c55781810151838201526020016101ad565b50505050905090810190601f1680156101f25780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b15801561021457600080fd5b505af1158015610228573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604090815281101561025157600080fd5b81516020830180516040519294929383019291908464010000000082111561027857600080fd5b90830190602082018581111561028d57600080fd5b82516401000000008111828201881017156102a757600080fd5b82525081516020918201929091019080838360005b838110156102d45781810151838201526020016102bc565b50505050905090810190601f1680156103015780820380516001836020036101000a031916815260200191505b5060405250506002546001600160a01b031692505050fffea265627a7a72315820aad239f376c1beacf0b9bbaa4588ff69a8bf2fa552f6b77b0578b6b84306dab164736f6c63430005100032",
"deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100415760003560e01c80636ad84def14610046578063cd3293de1461006a578063ce0aa39314610072575b600080fd5b61004e61007c565b604080516001600160a01b039092168252519081900360200190f35b61004e61008b565b61007a61009a565b005b6000546001600160a01b031681565b6001546001600160a01b031681565b60025460408051638da5cb5b60e01b815290516000926001600160a01b031691638da5cb5b916004808301926020929190829003018186803b1580156100df57600080fd5b505afa1580156100f3573d6000803e3d6000fd5b505050506040513d602081101561010957600080fd5b505160008054600154604080516001600160a01b03928316602480830191909152825180830382018152604492830184526020810180516001600160e01b0316634e76640560e11b17815260025494516368db844d60e11b815296861660048801818152958716948801859052606488018990526080938801938452825160848901528251999a50958a169863d1b7089a98969792969495939260a4019190808383885b838110156101c55781810151838201526020016101ad565b50505050905090810190601f1680156101f25780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b15801561021457600080fd5b505af1158015610228573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604090815281101561025157600080fd5b81516020830180516040519294929383019291908464010000000082111561027857600080fd5b90830190602082018581111561028d57600080fd5b82516401000000008111828201881017156102a757600080fd5b82525081516020918201929091019080838360005b838110156102d45781810151838201526020016102bc565b50505050905090810190601f1680156103015780820380516001836020036101000a031916815260200191505b5060405250506002546001600160a01b031692505050fffea265627a7a72315820aad239f376c1beacf0b9bbaa4588ff69a8bf2fa552f6b77b0578b6b84306dab164736f6c63430005100032",
"sourceMap": "305:727:32:-;;;422:277;8:9:-1;5:2;;;30:1;27;20:12;5:2;422:277:32;;;;;;;;;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;422:277:32;;;;;;;;;;;;;;-1:-1:-1;;;;;545:22:32;;537:65;;;;;-1:-1:-1;;;537:65:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;612:11;:26;;-1:-1:-1;;;;;612:26:32;;;-1:-1:-1;;;;;;612:26:32;;;;;;;;648:18;;;;;;;;;;;;;;;676:6;:16;;;;;;;;;;;;;;305:727;;;;;;",
"deployedSourceMap": "305:727:32:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;305:727:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;;342:26;;;:::i;:::-;;;;-1:-1:-1;;;;;342:26:32;;;;;;;;;;;;;;374:22;;;:::i;705:325::-;;;:::i;:::-;;342:26;;;-1:-1:-1;;;;;342:26:32;;:::o;374:22::-;;;-1:-1:-1;;;;;374:22:32;;:::o;705:325::-;797:6;;:14;;;-1:-1:-1;;;797:14:32;;;;744:30;;-1:-1:-1;;;;;797:6:32;;:12;;:14;;;;;;;;;;;;;;:6;:14;;;5:2:-1;;;;30:1;27;20:12;5:2;797:14:32;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;797:14:32;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;797:14:32;858:11;;;;930:7;883:55;;;-1:-1:-1;;;;;930:7:32;;;883:55;;;;;;;;;;26:21:-1;;;22:32;;6:49;;883:55:32;;;;;;797:14;25:18:-1;;61:17;;-1:-1;;;;;182:15;-1:-1;;;179:29;160:49;;952:6:32;;822:161;;-1:-1:-1;;;822:161:32;;858:11;;;822:161;;;;;;952:6;;;822:161;;;;;;;;;;;;;;;;;;;;;;;;;;;797:14;;-1:-1:-1;822:22:32;;;;;;858:11;;883:55;;952:6;;822:161;;;;;25:18:-1;822:161:32;;25:18:-1;858:11:32;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;822:161:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;822:161:32;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;822:161:32;;;;;;39:16:-1;36:1;17:17;2:54;101:4;822:161:32;80:15:-1;;;-1:-1;;76:31;65:43;;120:4;113:20;;;5:11;;2:2;;;29:1;26;19:12;2:2;822:161:32;;;;;;;;;;;;;;;;;;;19:11:-1;11:20;;8:2;;;44:1;41;34:12;8:2;62:21;;;;123:4;114:14;;138:31;;;135:2;;;182:1;179;172:12;135:2;213:10;;261:11;244:29;;285:43;;;282:58;-1:-1;233:115;230:2;;;361:1;358;351:12;230:2;372:25;;-1:-1;822:161:32;;420:4:-1;411:14;;;;822:161:32;;;;;411:14:-1;822:161:32;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;822:161:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;822:161:32;;-1:-1:-1;;1015:6:32;;-1:-1:-1;;;;;1015:6:32;;-1:-1:-1;;;994:29:32",
"source": "pragma solidity >0.5.4;\n\nimport \"@daostack/arc/contracts/controller/Avatar.sol\";\nimport \"@daostack/arc/contracts/controller/ControllerInterface.sol\";\n\nimport \"../../../../contracts/dao/schemes/SchemeGuard.sol\";\n\n/* @title Scheme contract responsible for setting the reserve\n * in fundmanager contract\n */\ncontract FundManagerSetReserve {\n address public fundmanager;\n address public reserve;\n Avatar avatar;\n\n constructor(\n Avatar _avatar,\n address _fundmanager,\n address _reserve\n ) public {\n require(_reserve != address(0), \"reserve cannot be null address\");\n fundmanager = _fundmanager;\n reserve = _reserve;\n avatar = _avatar;\n }\n\n function setReserve() public {\n ControllerInterface controller = ControllerInterface(avatar.owner());\n controller.genericCall(\n fundmanager,\n abi.encodeWithSignature(\"setReserve(address)\", reserve),\n avatar,\n 0\n );\n\n selfdestruct(address(avatar));\n }\n}\n",
"sourcePath": "/Users/hadar/workspace/GoodDollar/GoodBootstrap/packages/contracts/stakingModel/contracts/dao/schemes/FundManagerSetReserve.sol",
"ast": {
"absolutePath": "/Users/hadar/workspace/GoodDollar/GoodBootstrap/packages/contracts/stakingModel/contracts/dao/schemes/FundManagerSetReserve.sol",
"exportedSymbols": {
"FundManagerSetReserve": [
10894
]
},
"id": 10895,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 10822,
"literals": [
"solidity",
">",
"0.5",
".4"
],
"nodeType": "PragmaDirective",
"src": "0:23:32"
},
{
"absolutePath": "@daostack/arc/contracts/controller/Avatar.sol",
"file": "@daostack/arc/contracts/controller/Avatar.sol",
"id": 10823,
"nodeType": "ImportDirective",
"scope": 10895,
"sourceUnit": 12706,
"src": "25:55:32",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "@daostack/arc/contracts/controller/ControllerInterface.sol",
"file": "@daostack/arc/contracts/controller/ControllerInterface.sol",
"id": 10824,
"nodeType": "ImportDirective",
"scope": 10895,
"sourceUnit": 14395,
"src": "81:68:32",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/Users/hadar/workspace/GoodDollar/GoodBootstrap/packages/contracts/contracts/dao/schemes/SchemeGuard.sol",
"file": "../../../../contracts/dao/schemes/SchemeGuard.sol",
"id": 10825,
"nodeType": "ImportDirective",
"scope": 10895,
"sourceUnit": 1424,
"src": "151:59:32",
"symbolAliases": [],
"unitAlias": ""
},
{
"baseContracts": [],
"contractDependencies": [],
"contractKind": "contract",
"documentation": null,
"fullyImplemented": true,
"id": 10894,
"linearizedBaseContracts": [
10894
],
"name": "FundManagerSetReserve",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": false,
"id": 10827,
"name": "fundmanager",
"nodeType": "VariableDeclaration",
"scope": 10894,
"src": "342:26:32",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 10826,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "342:7:32",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"id": 10829,
"name": "reserve",
"nodeType": "VariableDeclaration",
"scope": 10894,
"src": "374:22:32",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 10828,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "374:7:32",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"id": 10831,
"name": "avatar",
"nodeType": "VariableDeclaration",
"scope": 10894,
"src": "402:13:32",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Avatar_$12705",
"typeString": "contract Avatar"
},
"typeName": {
"contractScope": null,
"id": 10830,
"name": "Avatar",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 12705,
"src": "402:6:32",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Avatar_$12705",
"typeString": "contract Avatar"
}
},
"value": null,
"visibility": "internal"
},
{
"body": {
"id": 10861,
"nodeType": "Block",
"src": "527:172:32",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 10845,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 10841,
"name": "_reserve",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 10837,
"src": "545:8:32",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "30",
"id": 10843,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "565:1:32",
"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": 10842,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "557:7:32",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": "address"
},
"id": 10844,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "557:10:32",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"src": "545:22:32",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "726573657276652063616e6e6f74206265206e756c6c2061646472657373",
"id": 10846,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "569:32:32",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_333c00a85d6a07c580616ba96640b2b92af1af46694ae6be9eba54f6ceaee334",
"typeString": "literal_string \"reserve cannot be null address\""
},
"value": "reserve cannot be null address"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_333c00a85d6a07c580616ba96640b2b92af1af46694ae6be9eba54f6ceaee334",
"typeString": "literal_string \"reserve cannot be null address\""
}
],
"id": 10840,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
22174,
22175
],
"referencedDeclaration": 22175,
"src": "537:7:32",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 10847,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "537:65:32",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 10848,
"nodeType": "ExpressionStatement",
"src": "537:65:32"
},
{
"expression": {
"argumentTypes": null,
"id": 10851,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 10849,
"name": "fundmanager",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 10827,
"src": "612:11:32",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 10850,
"name": "_fundmanager",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 10835,
"src": "626:12:32",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "612:26:32",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 10852,
"nodeType": "ExpressionStatement",
"src": "612:26:32"
},
{
"expression": {
"argumentTypes": null,
"id": 10855,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 10853,
"name": "reserve",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 10829,
"src": "648:7:32",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 10854,
"name": "_reserve",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 10837,
"src": "658:8:32",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "648:18:32",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 10856,
"nodeType": "ExpressionStatement",
"src": "648:18:32"
},
{
"expression": {
"argumentTypes": null,
"id": 10859,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 10857,
"name": "avatar",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 10831,
"src": "676:6:32",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Avatar_$12705",
"typeString": "contract Avatar"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 10858,
"name": "_avatar",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 10833,
"src": "685:7:32",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Avatar_$12705",
"typeString": "contract Avatar"
}
},
"src": "676:16:32",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Avatar_$12705",
"typeString": "contract Avatar"
}
},
"id": 10860,
"nodeType": "ExpressionStatement",
"src": "676:16:32"
}
]
},
"documentation": null,
"id": 10862,
"implemented": true,
"kind": "constructor",
"modifiers": [],
"name": "",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 10838,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 10833,
"name": "_avatar",
"nodeType": "VariableDeclaration",
"scope": 10862,
"src": "443:14:32",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Avatar_$12705",
"typeString": "contract Avatar"
},
"typeName": {
"contractScope": null,
"id": 10832,
"name": "Avatar",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 12705,
"src": "443:6:32",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Avatar_$12705",
"typeString": "contract Avatar"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 10835,
"name": "_fundmanager",
"nodeType": "VariableDeclaration",
"scope": 10862,
"src": "467:20:32",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 10834,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "467:7:32",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 10837,
"name": "_reserve",
"nodeType": "VariableDeclaration",
"scope": 10862,
"src": "497:16:32",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 10836,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "497:7:32",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "433:86:32"
},
"returnParameters": {
"id": 10839,
"nodeType": "ParameterList",
"parameters": [],
"src": "527:0:32"
},
"scope": 10894,
"src": "422:277:32",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 10892,
"nodeType": "Block",
"src": "734:296:32",
"statements": [
{
"assignments": [
10866
],
"declarations": [
{
"constant": false,
"id": 10866,
"name": "controller",
"nodeType": "VariableDeclaration",
"scope": 10892,
"src": "744:30:32",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ControllerInterface_$14394",
"typeString": "contract ControllerInterface"
},
"typeName": {
"contractScope": null,
"id": 10865,
"name": "ControllerInterface",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 14394,
"src": "744:19:32",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ControllerInterface_$14394",
"typeString": "contract ControllerInterface"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 10872,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"argumentTypes": null,
"id": 10868,
"name": "avatar",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 10831,
"src": "797:6:32",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Avatar_$12705",
"typeString": "contract Avatar"
}
},
"id": 10869,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "owner",
"nodeType": "MemberAccess",
"referencedDeclaration": 21342,
"src": "797:12:32",
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$__$returns$_t_address_$",
"typeString": "function () view external returns (address)"
}
},
"id": 10870,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "797:14:32",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 10867,
"name": "ControllerInterface",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 14394,
"src": "777:19:32",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_ControllerInterface_$14394_$",
"typeString": "type(contract ControllerInterface)"
}
},
"id": 10871,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "777:35:32",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ControllerInterface_$14394",
"typeString": "contract ControllerInterface"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "744:68:32"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 10876,
"name": "fundmanager",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 10827,
"src": "858:11:32",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "73657452657365727665286164647265737329",
"id": 10879,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "907:21:32",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_9cecc80af848059edc45e97286eacd2375e9d464d98c885f2a99982f1c1554b9",
"typeString": "literal_string \"setReserve(address)\""
},
"value": "setReserve(address)"
},
{
"argumentTypes": null,
"id": 10880,
"name": "reserve",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 10829,
"src": "930:7:32",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_stringliteral_9cecc80af848059edc45e97286eacd2375e9d464d98c885f2a99982f1c1554b9",
"typeString": "literal_string \"setReserve(address)\""
},
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"expression": {
"argumentTypes": null,
"id": 10877,
"name": "abi",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 22158,
"src": "883:3:32",
"typeDescriptions": {
"typeIdentifier": "t_magic_abi",
"typeString": "abi"
}
},
"id": 10878,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberName": "encodeWithSignature",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "883:23:32",
"typeDescriptions": {
"typeIdentifier": "t_function_abiencodewithsignature_pure$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$",
"typeString": "function (string memory) pure returns (bytes memory)"
}
},
"id": 10881,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "883:55:32",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
{
"argumentTypes": null,
"id": 10882,
"name": "avatar",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 10831,
"src": "952:6:32",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Avatar_$12705",
"typeString": "contract Avatar"
}
},
{
"argumentTypes": null,
"hexValue": "30",
"id": 10883,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "972:1:32",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
},
{
"typeIdentifier": "t_contract$_Avatar_$12705",
"typeString": "contract Avatar"
},
{
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
}
],
"expression": {
"argumentTypes": null,
"id": 10873,
"name": "controller",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 10866,
"src": "822:10:32",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ControllerInterface_$14394",
"typeString": "contract ControllerInterface"
}
},
"id": 10875,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "genericCall",
"nodeType": "MemberAccess",
"referencedDeclaration": 14271,
"src": "822:22:32",
"typeDescriptions": {
"typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_bytes_memory_ptr_$_t_contract$_Avatar_$12705_$_t_uint256_$returns$_t_bool_$_t_bytes_memory_ptr_$",
"typeString": "function (address,bytes memory,contract Avatar,uint256) external returns (bool,bytes memory)"
}
},
"id": 10884,
"isConstant": false,
"isLValue": false,