UNPKG

@gooddollar/goodcontracts

Version:
979 lines 82.4 kB
{ "contractName": "ChangeFirstTimeAward", "abi": [ { "inputs": [ { "internalType": "contract Avatar", "name": "_avatar", "type": "address" } ], "payable": false, "stateMutability": "nonpayable", "type": "constructor" }, { "constant": false, "inputs": [ { "internalType": "address", "name": "firstClaimPool", "type": "address" }, { "internalType": "uint256", "name": "award", "type": "uint256" } ], "name": "setAward", "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\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"firstClaimPool\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"award\",\"type\":\"uint256\"}],\"name\":\"setAward\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/Users/hadar/workspace/GoodDollar/GoodBootstrap/packages/contracts/stakingModel/contracts/dao/schemes/proposals/ChangeFirstTimeAward.sol\":\"ChangeFirstTimeAward\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/hadar/workspace/GoodDollar/GoodBootstrap/packages/contracts/stakingModel/contracts/dao/schemes/proposals/ChangeFirstTimeAward.sol\":{\"keccak256\":\"0x11b7850b91dc62fc0c0f439ed8649a1578e9ae9c31266436f1786b921eee614d\",\"urls\":[\"bzz-raw://38d9d6b4019773118543af01bde932997cb93ba615c7e3628729df87a6f0c86b\",\"dweb:/ipfs/QmbEmZ8BSwpQ6XVvAYv6aMAzCYyi1HYjg2BfdbfvLDmyVG\"]},\"@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": "0x608060405234801561001057600080fd5b506040516103d93803806103d98339818101604052602081101561003357600080fd5b5051600080546001600160a01b039092166001600160a01b0319909216919091179055610374806100656000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c80636606e2bb14610030575b600080fd5b61005c6004803603604081101561004657600080fd5b506001600160a01b03813516906020013561005e565b005b60008060009054906101000a90046001600160a01b03166001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156100ad57600080fd5b505afa1580156100c1573d6000803e3d6000fd5b505050506040513d60208110156100d757600080fd5b5051604080516024808201869052825180830382018152604492830184526020810180516001600160e01b0316632c71fbc360e21b1781526000805495516368db844d60e11b81526001600160a01b038b81166004830190815297811696820187905260648201839052608095820195865284516084830152845198995091979189169663d1b7089a968c9690948a949293919260a490920191808383885b8381101561018e578181015183820152602001610176565b50505050905090810190601f1680156101bb5780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b1580156101dd57600080fd5b505af11580156101f1573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604090815281101561021a57600080fd5b81516020830180516040519294929383019291908464010000000082111561024157600080fd5b90830190602082018581111561025657600080fd5b825164010000000081118282018810171561027057600080fd5b82525081516020918201929091019080838360005b8381101561029d578181015183820152602001610285565b50505050905090810190601f1680156102ca5780820380516001836020036101000a031916815260200191505b50604052505050509050806103105760405162461bcd60e51b815260040180806020018281038252602181526020018061031f6021913960400191505060405180910390fd5b6000546001600160a01b0316fffe73657474696e6720666972737420636c61696d20616d6f756e74206661696c6564a265627a7a72315820ed070e3d6face0d27939ed5f58b9344ad4a9b47a449df5431f4b525d96f00ba364736f6c63430005100032", "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061002b5760003560e01c80636606e2bb14610030575b600080fd5b61005c6004803603604081101561004657600080fd5b506001600160a01b03813516906020013561005e565b005b60008060009054906101000a90046001600160a01b03166001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156100ad57600080fd5b505afa1580156100c1573d6000803e3d6000fd5b505050506040513d60208110156100d757600080fd5b5051604080516024808201869052825180830382018152604492830184526020810180516001600160e01b0316632c71fbc360e21b1781526000805495516368db844d60e11b81526001600160a01b038b81166004830190815297811696820187905260648201839052608095820195865284516084830152845198995091979189169663d1b7089a968c9690948a949293919260a490920191808383885b8381101561018e578181015183820152602001610176565b50505050905090810190601f1680156101bb5780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b1580156101dd57600080fd5b505af11580156101f1573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604090815281101561021a57600080fd5b81516020830180516040519294929383019291908464010000000082111561024157600080fd5b90830190602082018581111561025657600080fd5b825164010000000081118282018810171561027057600080fd5b82525081516020918201929091019080838360005b8381101561029d578181015183820152602001610285565b50505050905090810190601f1680156102ca5780820380516001836020036101000a031916815260200191505b50604052505050509050806103105760405162461bcd60e51b815260040180806020018281038252602181526020018061031f6021913960400191505060405180910390fd5b6000546001600160a01b0316fffe73657474696e6720666972737420636c61696d20616d6f756e74206661696c6564a265627a7a72315820ed070e3d6face0d27939ed5f58b9344ad4a9b47a449df5431f4b525d96f00ba364736f6c63430005100032", "sourceMap": "200:717:38:-;;;250:59;8:9:-1;5:2;;;30:1;27;20:12;5:2;250:59:38;;;;;;;;;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;250:59:38;289:6;:16;;-1:-1:-1;;;;;289:16:38;;;-1:-1:-1;;;;;;289:16:38;;;;;;;;;200:717;;;;;;", "deployedSourceMap": "200:717:38:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;200:717:38;;;;;;;;;;;;;;;;;;;529:386;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;529:386:38;;;;;;;;:::i;:::-;;;597:30;650:6;;;;;;;;;-1:-1:-1;;;;;650:6:38;-1:-1:-1;;;;;650:12:38;;:14;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;650:14:38;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;650:14:38;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;650:14:38;743:57;;;;;;;;;;;;26:21:-1;;;22:32;;6:49;;743:57:38;;;;;;650:14;25:18:-1;;61:17;;-1:-1;;;;;182:15;-1:-1;;;179:29;160:49;;670:7:38;806:6;;686:138;;-1:-1:-1;;;686:138:38;;-1:-1:-1;;;;;686:138:38;;;;;;;;;806:6;;;686:138;;;;;;;;;;;;;;;;;;;;;;;;;;;650:14;;-1:-1:-1;670:7:38;;686:22;;;;;;722:14;;806:6;;670:7;;686:138;;;;;;;;;;;25:18:-1;670:7:38;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;686:138:38;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;686:138:38;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;686:138:38;;;;;;39:16:-1;36:1;17:17;2:54;101:4;686:138:38;80:15:-1;;;-1:-1;;76:31;65:43;;120:4;113:20;;;5:11;;2:2;;;29:1;26;19:12;2:2;686:138:38;;;;;;;;;;;;;;;;;;;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;686:138:38;;420:4:-1;411:14;;;;686:138:38;;;;;411:14:-1;686:138:38;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;686:138:38;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;669:155;;;837:2;829:48;;;;-1:-1:-1;;;829:48:38;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;903:6;;-1:-1:-1;;;;;903:6:38;882:29", "source": "pragma solidity >0.5.4;\n\nimport \"@daostack/arc/contracts/controller/Avatar.sol\";\nimport \"@daostack/arc/contracts/controller/ControllerInterface.sol\";\n\n/* @title Scheme for switching to AMB bridge\n */\ncontract ChangeFirstTimeAward {\n\tAvatar avatar;\n\n\tconstructor(Avatar _avatar) public {\n\t\tavatar = _avatar;\n\t}\n\n\t/* @dev Adds the bridge address to minters, deploys the home bridge on\n\t * current network, and then self-destructs, transferring any ether on the\n\t * contract to the avatar. Reverts if scheme is not registered\n\t */\n\tfunction setAward(address firstClaimPool, uint256 award) public {\n\t\tControllerInterface controller = ControllerInterface(avatar.owner());\n\t\t(bool ok, ) =\n\t\t\tcontroller.genericCall(\n\t\t\t\taddress(firstClaimPool),\n\t\t\t\tabi.encodeWithSignature(\"setClaimAmount(uint256)\", award),\n\t\t\t\tavatar,\n\t\t\t\t0\n\t\t\t);\n\n\t\trequire(ok, \"setting first claim amount failed\");\n\n\t\tselfdestruct(address(avatar));\n\t}\n}\n", "sourcePath": "/Users/hadar/workspace/GoodDollar/GoodBootstrap/packages/contracts/stakingModel/contracts/dao/schemes/proposals/ChangeFirstTimeAward.sol", "ast": { "absolutePath": "/Users/hadar/workspace/GoodDollar/GoodBootstrap/packages/contracts/stakingModel/contracts/dao/schemes/proposals/ChangeFirstTimeAward.sol", "exportedSymbols": { "ChangeFirstTimeAward": [ 11382 ] }, "id": 11383, "nodeType": "SourceUnit", "nodes": [ { "id": 11324, "literals": [ "solidity", ">", "0.5", ".4" ], "nodeType": "PragmaDirective", "src": "0:23:38" }, { "absolutePath": "@daostack/arc/contracts/controller/Avatar.sol", "file": "@daostack/arc/contracts/controller/Avatar.sol", "id": 11325, "nodeType": "ImportDirective", "scope": 11383, "sourceUnit": 12706, "src": "25:55:38", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "@daostack/arc/contracts/controller/ControllerInterface.sol", "file": "@daostack/arc/contracts/controller/ControllerInterface.sol", "id": 11326, "nodeType": "ImportDirective", "scope": 11383, "sourceUnit": 14395, "src": "81:68:38", "symbolAliases": [], "unitAlias": "" }, { "baseContracts": [], "contractDependencies": [], "contractKind": "contract", "documentation": null, "fullyImplemented": true, "id": 11382, "linearizedBaseContracts": [ 11382 ], "name": "ChangeFirstTimeAward", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, "id": 11328, "name": "avatar", "nodeType": "VariableDeclaration", "scope": 11382, "src": "233:13:38", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_contract$_Avatar_$12705", "typeString": "contract Avatar" }, "typeName": { "contractScope": null, "id": 11327, "name": "Avatar", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 12705, "src": "233:6:38", "typeDescriptions": { "typeIdentifier": "t_contract$_Avatar_$12705", "typeString": "contract Avatar" } }, "value": null, "visibility": "internal" }, { "body": { "id": 11337, "nodeType": "Block", "src": "285:24:38", "statements": [ { "expression": { "argumentTypes": null, "id": 11335, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 11333, "name": "avatar", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 11328, "src": "289:6:38", "typeDescriptions": { "typeIdentifier": "t_contract$_Avatar_$12705", "typeString": "contract Avatar" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 11334, "name": "_avatar", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 11330, "src": "298:7:38", "typeDescriptions": { "typeIdentifier": "t_contract$_Avatar_$12705", "typeString": "contract Avatar" } }, "src": "289:16:38", "typeDescriptions": { "typeIdentifier": "t_contract$_Avatar_$12705", "typeString": "contract Avatar" } }, "id": 11336, "nodeType": "ExpressionStatement", "src": "289:16:38" } ] }, "documentation": null, "id": 11338, "implemented": true, "kind": "constructor", "modifiers": [], "name": "", "nodeType": "FunctionDefinition", "parameters": { "id": 11331, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 11330, "name": "_avatar", "nodeType": "VariableDeclaration", "scope": 11338, "src": "262:14:38", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_contract$_Avatar_$12705", "typeString": "contract Avatar" }, "typeName": { "contractScope": null, "id": 11329, "name": "Avatar", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 12705, "src": "262:6:38", "typeDescriptions": { "typeIdentifier": "t_contract$_Avatar_$12705", "typeString": "contract Avatar" } }, "value": null, "visibility": "internal" } ], "src": "261:16:38" }, "returnParameters": { "id": 11332, "nodeType": "ParameterList", "parameters": [], "src": "285:0:38" }, "scope": 11382, "src": "250:59:38", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { "id": 11380, "nodeType": "Block", "src": "593:322:38", "statements": [ { "assignments": [ 11346 ], "declarations": [ { "constant": false, "id": 11346, "name": "controller", "nodeType": "VariableDeclaration", "scope": 11380, "src": "597:30:38", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_contract$_ControllerInterface_$14394", "typeString": "contract ControllerInterface" }, "typeName": { "contractScope": null, "id": 11345, "name": "ControllerInterface", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 14394, "src": "597:19:38", "typeDescriptions": { "typeIdentifier": "t_contract$_ControllerInterface_$14394", "typeString": "contract ControllerInterface" } }, "value": null, "visibility": "internal" } ], "id": 11352, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "expression": { "argumentTypes": null, "id": 11348, "name": "avatar", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 11328, "src": "650:6:38", "typeDescriptions": { "typeIdentifier": "t_contract$_Avatar_$12705", "typeString": "contract Avatar" } }, "id": 11349, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "owner", "nodeType": "MemberAccess", "referencedDeclaration": 21342, "src": "650:12:38", "typeDescriptions": { "typeIdentifier": "t_function_external_view$__$returns$_t_address_$", "typeString": "function () view external returns (address)" } }, "id": 11350, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "650:14:38", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 11347, "name": "ControllerInterface", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 14394, "src": "630:19:38", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_ControllerInterface_$14394_$", "typeString": "type(contract ControllerInterface)" } }, "id": 11351, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "630:35:38", "typeDescriptions": { "typeIdentifier": "t_contract$_ControllerInterface_$14394", "typeString": "contract ControllerInterface" } }, "nodeType": "VariableDeclarationStatement", "src": "597:68:38" }, { "assignments": [ 11354, null ], "declarations": [ { "constant": false, "id": 11354, "name": "ok", "nodeType": "VariableDeclaration", "scope": 11380, "src": "670:7:38", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 11353, "name": "bool", "nodeType": "ElementaryTypeName", "src": "670:4:38", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" }, null ], "id": 11368, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 11358, "name": "firstClaimPool", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 11340, "src": "722:14:38", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 11357, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "714:7:38", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": "address" }, "id": 11359, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "714:23:38", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "hexValue": "736574436c61696d416d6f756e742875696e7432353629", "id": 11362, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "767:25:38", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_b1c7ef0c0b07e727311a40c4390dd551f9bc2cb7e6725a87f7301ce4c0278f16", "typeString": "literal_string \"setClaimAmount(uint256)\"" }, "value": "setClaimAmount(uint256)" }, { "argumentTypes": null, "id": 11363, "name": "award", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 11342, "src": "794:5:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_stringliteral_b1c7ef0c0b07e727311a40c4390dd551f9bc2cb7e6725a87f7301ce4c0278f16", "typeString": "literal_string \"setClaimAmount(uint256)\"" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 11360, "name": "abi", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 22158, "src": "743:3:38", "typeDescriptions": { "typeIdentifier": "t_magic_abi", "typeString": "abi" } }, "id": 11361, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberName": "encodeWithSignature", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "743:23:38", "typeDescriptions": { "typeIdentifier": "t_function_abiencodewithsignature_pure$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", "typeString": "function (string memory) pure returns (bytes memory)" } }, "id": 11364, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "743:57:38", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } }, { "argumentTypes": null, "id": 11365, "name": "avatar", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 11328, "src": "806:6:38", "typeDescriptions": { "typeIdentifier": "t_contract$_Avatar_$12705", "typeString": "contract Avatar" } }, { "argumentTypes": null, "hexValue": "30", "id": 11366, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "818:1:38", "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": 11355, "name": "controller", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 11346, "src": "686:10:38", "typeDescriptions": { "typeIdentifier": "t_contract$_ControllerInterface_$14394", "typeString": "contract ControllerInterface" } }, "id": 11356, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "genericCall", "nodeType": "MemberAccess", "referencedDeclaration": 14271, "src": "686:22:38", "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": 11367, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "686:138:38", "typeDescriptions": { "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", "typeString": "tuple(bool,bytes memory)" } }, "nodeType": "VariableDeclarationStatement", "src": "669:155:38" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 11370, "name": "ok", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 11354, "src": "837:2:38", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "73657474696e6720666972737420636c61696d20616d6f756e74206661696c6564", "id": 11371, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "841:35:38", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_fe5e6ce99e457edb23ae54bed907ad67a0cd02a21918bf868bc385d92de280d2", "typeString": "literal_string \"setting first claim amount failed\"" }, "value": "setting first claim amount failed" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_fe5e6ce99e457edb23ae54bed907ad67a0cd02a21918bf868bc385d92de280d2", "typeString": "literal_string \"setting first claim amount failed\"" } ], "id": 11369, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 22174, 22175 ], "referencedDeclaration": 22175, "src": "829:7:38", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 11372, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "829:48:38", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 11373, "nodeType": "ExpressionStatement", "src": "829:48:38" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 11376, "name": "avatar", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 11328, "src": "903:6:38", "typeDescriptions": { "typeIdentifier": "t_contract$_Avatar_$12705", "typeString": "contract Avatar" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_contract$_Avatar_$12705", "typeString": "contract Avatar" } ], "id": 11375, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "895:7:38", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": "address" }, "id": 11377, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "895:15:38", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" } ], "id": 11374, "name": "selfdestruct", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 22179, "src": "882:12:38", "typeDescriptions": { "typeIdentifier": "t_function_selfdestruct_nonpayable$_t_address_payable_$returns$__$", "typeString": "function (address payable)" } }, "id": 11378, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "882:29:38", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 11379, "nodeType": "ExpressionStatement", "src": "882:29:38" } ] }, "documentation": null, "id": 11381, "implemented": true, "kind": "function", "modifiers": [], "name": "setAward", "nodeType": "FunctionDefinition", "parameters": { "id": 11343, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 11340, "name": "firstClaimPool", "nodeType": "VariableDeclaration", "scope": 11381, "src": "547:22:38", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 11339, "name": "address", "nodeType": "ElementaryTypeName", "src": "547:7:38", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 11342, "name": "award", "nodeType": "VariableDeclaration", "scope": 11381, "src": "571:13:38", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 11341, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "571:7:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "546:39:38" }, "returnParameters": { "id": 11344, "nodeType": "ParameterList", "parameters": [], "src": "593:0:38" }, "scope": 11382, "src": "529:386:38", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" } ], "scope": 11383, "src": "200:717:38" } ], "src": "0:918:38" }, "legacyAST": { "absolutePath": "/Users/hadar/workspace/GoodDollar/GoodBootstrap/packages/contracts/stakingModel/contracts/dao/schemes/proposals/ChangeFirstTimeAward.sol", "exportedSymbols": { "ChangeFirstTimeAward": [ 11382 ] }, "id": 11383, "nodeType": "SourceUnit", "nodes": [ { "id": 11324, "literals": [ "solidity", ">", "0.5", ".4" ], "nodeType": "PragmaDirective", "src": "0:23:38" }, { "absolutePath": "@daostack/arc/contracts/controller/Avatar.sol", "file": "@daostack/arc/contracts/controller/Avatar.sol", "id": 11325, "nodeType": "ImportDirective", "scope": 11383, "sourceUnit": 12706, "src": "25:55:38", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "@daostack/arc/contracts/controller/ControllerInterface.sol", "file": "@daostack/arc/contracts/controller/ControllerInterface.sol", "id": 11326, "nodeType": "ImportDirective", "scope": 11383, "sourceUnit": 14395, "src": "81:68:38", "symbolAliases": [], "unitAlias": "" }, { "baseContracts": [], "contractDependencies": [], "contractKind": "contract", "documentation": null, "fullyImplemented": true, "id": 11382, "linearizedBaseContracts": [ 11382 ], "name": "ChangeFirstTimeAward", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, "id": 11328, "name": "avatar", "nodeType": "VariableDeclaration", "scope": 11382, "src": "233:13:38", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_contract$_Avatar_$12705", "typeString": "contract Avatar" }, "typeName": { "contractScope": null, "id": 11327, "name": "Avatar", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 12705, "src": "233:6:38", "typeDescriptions": { "typeIdentifier": "t_contract$_Avatar_$12705", "typeString": "contract Avatar" } }, "value": null, "visibility": "internal" }, { "body": { "id": 11337, "nodeType": "Block",