UNPKG

@gooddollar/goodcontracts

Version:
980 lines (979 loc) 79.1 kB
{ "contractName": "ChangeUBICyclePeriod", "abi": [ { "inputs": [ { "internalType": "contract Avatar", "name": "_avatar", "type": "address" } ], "payable": false, "stateMutability": "nonpayable", "type": "constructor" }, { "constant": false, "inputs": [ { "internalType": "address", "name": "_ubi", "type": "address" }, { "internalType": "uint256", "name": "_length", "type": "uint256" } ], "name": "setPeriod", "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\":\"_ubi\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_length\",\"type\":\"uint256\"}],\"name\":\"setPeriod\",\"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/ChangeUBICyclePeriod.sol\":\"ChangeUBICyclePeriod\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/hadar/workspace/GoodDollar/GoodBootstrap/packages/contracts/stakingModel/contracts/dao/schemes/proposals/ChangeUBICyclePeriod.sol\":{\"keccak256\":\"0x5112cc13d4537e8e3b8a28eec72a1b92d6e9f5be04a2a0f51c6ac650d57cd05b\",\"urls\":[\"bzz-raw://a71dfb92a9f7a5597ad38b51aa659d44b800dba1f6c23ce402185a68a12565d4\",\"dweb:/ipfs/QmeyBGKenvMFVU2p7cJ1QU4FFKBVf2v18B3ajdzKF9En5A\"]},\"@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": "0x608060405234801561001057600080fd5b506040516103da3803806103da8339818101604052602081101561003357600080fd5b5051600080546001600160a01b039092166001600160a01b0319909216919091179055610375806100656000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c80637254026114610030575b600080fd5b61005c6004803603604081101561004657600080fd5b506001600160a01b03813516906020013561005e565b005b60008060009054906101000a90046001600160a01b03166001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156100ad57600080fd5b505afa1580156100c1573d6000803e3d6000fd5b505050506040513d60208110156100d757600080fd5b5051604080516024808201869052825180830382018152604492830184526020810180516001600160e01b0316631ec2676560e11b1781526000805495516368db844d60e11b81526001600160a01b038b81166004830190815297811696820187905260648201839052608095820195865284516084830152845198995091979189169663d1b7089a968c9690948a949293919260a490920191808383885b8381101561018e578181015183820152602001610176565b50505050905090810190601f1680156101bb5780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b1580156101dd57600080fd5b505af11580156101f1573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604090815281101561021a57600080fd5b81516020830180516040519294929383019291908464010000000082111561024157600080fd5b90830190602082018581111561025657600080fd5b825164010000000081118282018810171561027057600080fd5b82525081516020918201929091019080838360005b8381101561029d578181015183820152602001610285565b50505050905090810190601f1680156102ca5780820380516001836020036101000a031916815260200191505b50604052505050509050806103105760405162461bcd60e51b815260040180806020018281038252602281526020018061031f6022913960400191505060405180910390fd5b6000546001600160a01b0316fffe73657474696e67206379636c65206c656e67746820706572696f64206661696c6564a265627a7a7231582023be9474f7129898d924d71e4a38b710bb2d184247c1324daeca8c706dc24e0564736f6c63430005100032", "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061002b5760003560e01c80637254026114610030575b600080fd5b61005c6004803603604081101561004657600080fd5b506001600160a01b03813516906020013561005e565b005b60008060009054906101000a90046001600160a01b03166001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156100ad57600080fd5b505afa1580156100c1573d6000803e3d6000fd5b505050506040513d60208110156100d757600080fd5b5051604080516024808201869052825180830382018152604492830184526020810180516001600160e01b0316631ec2676560e11b1781526000805495516368db844d60e11b81526001600160a01b038b81166004830190815297811696820187905260648201839052608095820195865284516084830152845198995091979189169663d1b7089a968c9690948a949293919260a490920191808383885b8381101561018e578181015183820152602001610176565b50505050905090810190601f1680156101bb5780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b1580156101dd57600080fd5b505af11580156101f1573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604090815281101561021a57600080fd5b81516020830180516040519294929383019291908464010000000082111561024157600080fd5b90830190602082018581111561025657600080fd5b825164010000000081118282018810171561027057600080fd5b82525081516020918201929091019080838360005b8381101561029d578181015183820152602001610285565b50505050905090810190601f1680156102ca5780820380516001836020036101000a031916815260200191505b50604052505050509050806103105760405162461bcd60e51b815260040180806020018281038252602281526020018061031f6022913960400191505060405180910390fd5b6000546001600160a01b0316fffe73657474696e67206379636c65206c656e67746820706572696f64206661696c6564a265627a7a7231582023be9474f7129898d924d71e4a38b710bb2d184247c1324daeca8c706dc24e0564736f6c63430005100032", "sourceMap": "200:834:40:-;;;390:59;8:9:-1;5:2;;;30:1;27;20:12;5:2;390:59:40;;;;;;;;;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;390:59:40;429:6;:16;;-1:-1:-1;;;;;429:16:40;;;-1:-1:-1;;;;;;429:16:40;;;;;;;;;200:834;;;;;;", "deployedSourceMap": "200:834:40:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;200:834:40;;;;;;;;;;;;;;;;;;;669:363;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;669:363:40;;;;;;;;:::i;:::-;;;730:30;783:6;;;;;;;;;-1:-1:-1;;;;;783:6:40;-1:-1:-1;;;;;783:12:40;;:14;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;783:14:40;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;783:14:40;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;783:14:40;857:59;;;;;;;;;;;;26:21:-1;;;22:32;;6:49;;857:59:40;;;;;;783:14;25:18:-1;;61:17;;-1:-1;;;;;182:15;-1:-1;;;179:29;160:49;;803:7:40;922:6;;819:121;;-1:-1:-1;;;819:121:40;;-1:-1:-1;;;;;819:121:40;;;;;;;;;922:6;;;819:121;;;;;;;;;;;;;;;;;;;;;;;;;;;783:14;;-1:-1:-1;803:7:40;;819:22;;;;;;847:4;;922:6;;803:7;;819:121;;;;;;;;;;;25:18:-1;803:7:40;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;819:121:40;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;819:121:40;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;819:121:40;;;;;;39:16:-1;36:1;17:17;2:54;101:4;819:121:40;80:15:-1;;;-1:-1;;76:31;65:43;;120:4;113:20;;;5:11;;2:2;;;29:1;26;19:12;2:2;819:121:40;;;;;;;;;;;;;;;;;;;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;819:121:40;;420:4:-1;411:14;;;;819:121:40;;;;;411:14:-1;819:121:40;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;819:121:40;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;802:138;;;953:2;945:49;;;;-1:-1:-1;;;945:49:40;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1020:6;;-1:-1:-1;;;;;1020:6:40;999: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 ChangeUBICyclePeriod {\n\tAvatar avatar;\n\n\t/* @dev constructor. Sets the factory address. Reverts if given address is null\n\t * @param _factory The address of the bridge factory\n\t */\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 setPeriod(address _ubi, uint256 _length) public {\n\t\tControllerInterface controller = ControllerInterface(avatar.owner());\n\t\t(bool ok, ) =\n\t\t\tcontroller.genericCall(\n\t\t\t\t_ubi,\n\t\t\t\tabi.encodeWithSignature(\"setCycleLength(uint256)\", _length),\n\t\t\t\tavatar,\n\t\t\t\t0\n\t\t\t);\n\n\t\trequire(ok, \"setting cycle length period failed\");\n\n\t\tselfdestruct(address(avatar));\n\t}\n}\n", "sourcePath": "/Users/hadar/workspace/GoodDollar/GoodBootstrap/packages/contracts/stakingModel/contracts/dao/schemes/proposals/ChangeUBICyclePeriod.sol", "ast": { "absolutePath": "/Users/hadar/workspace/GoodDollar/GoodBootstrap/packages/contracts/stakingModel/contracts/dao/schemes/proposals/ChangeUBICyclePeriod.sol", "exportedSymbols": { "ChangeUBICyclePeriod": [ 11548 ] }, "id": 11549, "nodeType": "SourceUnit", "nodes": [ { "id": 11492, "literals": [ "solidity", ">", "0.5", ".4" ], "nodeType": "PragmaDirective", "src": "0:23:40" }, { "absolutePath": "@daostack/arc/contracts/controller/Avatar.sol", "file": "@daostack/arc/contracts/controller/Avatar.sol", "id": 11493, "nodeType": "ImportDirective", "scope": 11549, "sourceUnit": 12706, "src": "25:55:40", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "@daostack/arc/contracts/controller/ControllerInterface.sol", "file": "@daostack/arc/contracts/controller/ControllerInterface.sol", "id": 11494, "nodeType": "ImportDirective", "scope": 11549, "sourceUnit": 14395, "src": "81:68:40", "symbolAliases": [], "unitAlias": "" }, { "baseContracts": [], "contractDependencies": [], "contractKind": "contract", "documentation": null, "fullyImplemented": true, "id": 11548, "linearizedBaseContracts": [ 11548 ], "name": "ChangeUBICyclePeriod", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, "id": 11496, "name": "avatar", "nodeType": "VariableDeclaration", "scope": 11548, "src": "233:13:40", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_contract$_Avatar_$12705", "typeString": "contract Avatar" }, "typeName": { "contractScope": null, "id": 11495, "name": "Avatar", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 12705, "src": "233:6:40", "typeDescriptions": { "typeIdentifier": "t_contract$_Avatar_$12705", "typeString": "contract Avatar" } }, "value": null, "visibility": "internal" }, { "body": { "id": 11505, "nodeType": "Block", "src": "425:24:40", "statements": [ { "expression": { "argumentTypes": null, "id": 11503, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 11501, "name": "avatar", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 11496, "src": "429:6:40", "typeDescriptions": { "typeIdentifier": "t_contract$_Avatar_$12705", "typeString": "contract Avatar" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 11502, "name": "_avatar", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 11498, "src": "438:7:40", "typeDescriptions": { "typeIdentifier": "t_contract$_Avatar_$12705", "typeString": "contract Avatar" } }, "src": "429:16:40", "typeDescriptions": { "typeIdentifier": "t_contract$_Avatar_$12705", "typeString": "contract Avatar" } }, "id": 11504, "nodeType": "ExpressionStatement", "src": "429:16:40" } ] }, "documentation": null, "id": 11506, "implemented": true, "kind": "constructor", "modifiers": [], "name": "", "nodeType": "FunctionDefinition", "parameters": { "id": 11499, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 11498, "name": "_avatar", "nodeType": "VariableDeclaration", "scope": 11506, "src": "402:14:40", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_contract$_Avatar_$12705", "typeString": "contract Avatar" }, "typeName": { "contractScope": null, "id": 11497, "name": "Avatar", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 12705, "src": "402:6:40", "typeDescriptions": { "typeIdentifier": "t_contract$_Avatar_$12705", "typeString": "contract Avatar" } }, "value": null, "visibility": "internal" } ], "src": "401:16:40" }, "returnParameters": { "id": 11500, "nodeType": "ParameterList", "parameters": [], "src": "425:0:40" }, "scope": 11548, "src": "390:59:40", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { "id": 11546, "nodeType": "Block", "src": "726:306:40", "statements": [ { "assignments": [ 11514 ], "declarations": [ { "constant": false, "id": 11514, "name": "controller", "nodeType": "VariableDeclaration", "scope": 11546, "src": "730:30:40", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_contract$_ControllerInterface_$14394", "typeString": "contract ControllerInterface" }, "typeName": { "contractScope": null, "id": 11513, "name": "ControllerInterface", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 14394, "src": "730:19:40", "typeDescriptions": { "typeIdentifier": "t_contract$_ControllerInterface_$14394", "typeString": "contract ControllerInterface" } }, "value": null, "visibility": "internal" } ], "id": 11520, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "expression": { "argumentTypes": null, "id": 11516, "name": "avatar", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 11496, "src": "783:6:40", "typeDescriptions": { "typeIdentifier": "t_contract$_Avatar_$12705", "typeString": "contract Avatar" } }, "id": 11517, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "owner", "nodeType": "MemberAccess", "referencedDeclaration": 21342, "src": "783:12:40", "typeDescriptions": { "typeIdentifier": "t_function_external_view$__$returns$_t_address_$", "typeString": "function () view external returns (address)" } }, "id": 11518, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "783:14:40", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 11515, "name": "ControllerInterface", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 14394, "src": "763:19:40", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_ControllerInterface_$14394_$", "typeString": "type(contract ControllerInterface)" } }, "id": 11519, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "763:35:40", "typeDescriptions": { "typeIdentifier": "t_contract$_ControllerInterface_$14394", "typeString": "contract ControllerInterface" } }, "nodeType": "VariableDeclarationStatement", "src": "730:68:40" }, { "assignments": [ 11522, null ], "declarations": [ { "constant": false, "id": 11522, "name": "ok", "nodeType": "VariableDeclaration", "scope": 11546, "src": "803:7:40", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 11521, "name": "bool", "nodeType": "ElementaryTypeName", "src": "803:4:40", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" }, null ], "id": 11534, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 11525, "name": "_ubi", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 11508, "src": "847:4:40", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "hexValue": "7365744379636c654c656e6774682875696e7432353629", "id": 11528, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "881:25:40", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_3d84cecaecc6280876a22ac7dd20c92ab5fb432ef6228997b7f76abb9c5e1cb7", "typeString": "literal_string \"setCycleLength(uint256)\"" }, "value": "setCycleLength(uint256)" }, { "argumentTypes": null, "id": 11529, "name": "_length", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 11510, "src": "908:7:40", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_stringliteral_3d84cecaecc6280876a22ac7dd20c92ab5fb432ef6228997b7f76abb9c5e1cb7", "typeString": "literal_string \"setCycleLength(uint256)\"" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 11526, "name": "abi", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 22158, "src": "857:3:40", "typeDescriptions": { "typeIdentifier": "t_magic_abi", "typeString": "abi" } }, "id": 11527, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberName": "encodeWithSignature", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "857:23:40", "typeDescriptions": { "typeIdentifier": "t_function_abiencodewithsignature_pure$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", "typeString": "function (string memory) pure returns (bytes memory)" } }, "id": 11530, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "857:59:40", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } }, { "argumentTypes": null, "id": 11531, "name": "avatar", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 11496, "src": "922:6:40", "typeDescriptions": { "typeIdentifier": "t_contract$_Avatar_$12705", "typeString": "contract Avatar" } }, { "argumentTypes": null, "hexValue": "30", "id": 11532, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "934:1:40", "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": 11523, "name": "controller", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 11514, "src": "819:10:40", "typeDescriptions": { "typeIdentifier": "t_contract$_ControllerInterface_$14394", "typeString": "contract ControllerInterface" } }, "id": 11524, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "genericCall", "nodeType": "MemberAccess", "referencedDeclaration": 14271, "src": "819:22:40", "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": 11533, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "819:121:40", "typeDescriptions": { "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", "typeString": "tuple(bool,bytes memory)" } }, "nodeType": "VariableDeclarationStatement", "src": "802:138:40" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 11536, "name": "ok", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 11522, "src": "953:2:40", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "73657474696e67206379636c65206c656e67746820706572696f64206661696c6564", "id": 11537, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "957:36:40", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_d2af5671b778d08c8e780e014d3bd26e1803c78521e7a03080272075a8075bd5", "typeString": "literal_string \"setting cycle length period failed\"" }, "value": "setting cycle length period failed" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_d2af5671b778d08c8e780e014d3bd26e1803c78521e7a03080272075a8075bd5", "typeString": "literal_string \"setting cycle length period failed\"" } ], "id": 11535, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 22174, 22175 ], "referencedDeclaration": 22175, "src": "945:7:40", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 11538, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "945:49:40", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 11539, "nodeType": "ExpressionStatement", "src": "945:49:40" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 11542, "name": "avatar", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 11496, "src": "1020:6:40", "typeDescriptions": { "typeIdentifier": "t_contract$_Avatar_$12705", "typeString": "contract Avatar" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_contract$_Avatar_$12705", "typeString": "contract Avatar" } ], "id": 11541, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "1012:7:40", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": "address" }, "id": 11543, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1012:15:40", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" } ], "id": 11540, "name": "selfdestruct", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 22179, "src": "999:12:40", "typeDescriptions": { "typeIdentifier": "t_function_selfdestruct_nonpayable$_t_address_payable_$returns$__$", "typeString": "function (address payable)" } }, "id": 11544, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "999:29:40", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 11545, "nodeType": "ExpressionStatement", "src": "999:29:40" } ] }, "documentation": null, "id": 11547, "implemented": true, "kind": "function", "modifiers": [], "name": "setPeriod", "nodeType": "FunctionDefinition", "parameters": { "id": 11511, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 11508, "name": "_ubi", "nodeType": "VariableDeclaration", "scope": 11547, "src": "688:12:40", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 11507, "name": "address", "nodeType": "ElementaryTypeName", "src": "688:7:40", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 11510, "name": "_length", "nodeType": "VariableDeclaration", "scope": 11547, "src": "702:15:40", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 11509, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "702:7:40", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "687:31:40" }, "returnParameters": { "id": 11512, "nodeType": "ParameterList", "parameters": [], "src": "726:0:40" }, "scope": 11548, "src": "669:363:40", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" } ], "scope": 11549, "src": "200:834:40" } ], "src": "0:1035:40" }, "legacyAST": { "absolutePath": "/Users/hadar/workspace/GoodDollar/GoodBootstrap/packages/contracts/stakingModel/contracts/dao/schemes/proposals/ChangeUBICyclePeriod.sol", "exportedSymbols": { "ChangeUBICyclePeriod": [ 11548 ] }, "id": 11549, "nodeType": "SourceUnit", "nodes": [ { "id": 11492, "literals": [ "solidity", ">", "0.5", ".4" ], "nodeType": "PragmaDirective", "src": "0:23:40" }, { "absolutePath": "@daostack/arc/contracts/controller/Avatar.sol", "file": "@daostack/arc/contracts/controller/Avatar.sol", "id": 11493, "nodeType": "ImportDirective", "scope": 11549, "sourceUnit": 12706, "src": "25:55:40", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "@daostack/arc/contracts/controller/ControllerInterface.sol", "file": "@daostack/arc/contracts/controller/ControllerInterface.sol", "id": 11494, "nodeType": "ImportDirective", "scope": 11549, "sourceUnit": 14395, "src": "81:68:40", "symbolAliases": [], "unitAlias": "" }, { "baseContracts": [], "contractDependencies": [], "contractKind": "contract", "documentation": null, "fullyImplemented": true, "id": 11548, "linearizedBaseContracts": [ 11548 ], "name": "ChangeUBICyclePeriod", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, "id": 11496, "name": "avatar", "nodeType": "VariableDeclaration", "scope": 11548, "src": "233:13:40", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_contract$_Avatar_$12705", "typeString": "contract Avatar" }, "typeName": { "contractScope": null, "id": 11495, "name": "Avatar", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 12705, "src": "233:6:40", "typeDescriptions": { "typeIdentifier": "t_contract$_Avatar_$12705", "typeString": "contract Avatar" } }, "value": null, "visibility": "internal" }, { "body": { "id": 11505, "nodeType": "Block", "src": "425:24:40", "statements": [ { "expression": { "argumentTypes": null, "id": 11503, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 11501, "name": "avatar", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 11496, "src": "429:6:40", "typeDescriptions": { "typeIdentifier": "t_contract$_Avatar_$12705", "typeString": "contract Avatar" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 11502, "name": "_avatar", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 11498, "src": "438:7:40", "typeDescriptions": { "typeIdentifier": "t_contract$_Avatar_$12705", "typeString": "contract Avatar" } },