{
  "contractName": "PeriodicStages",
  "abi": [
    {
      "constant": true,
      "inputs": [],
      "name": "stack",
      "outputs": [
        {
          "name": "",
          "type": "address"
        }
      ],
      "payable": false,
      "stateMutability": "view",
      "type": "function"
    },
    {
      "constant": false,
      "inputs": [],
      "name": "renounceOwnership",
      "outputs": [],
      "payable": false,
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "constant": true,
      "inputs": [],
      "name": "owner",
      "outputs": [
        {
          "name": "",
          "type": "address"
        }
      ],
      "payable": false,
      "stateMutability": "view",
      "type": "function"
    },
    {
      "constant": true,
      "inputs": [],
      "name": "isOwner",
      "outputs": [
        {
          "name": "",
          "type": "bool"
        }
      ],
      "payable": false,
      "stateMutability": "view",
      "type": "function"
    },
    {
      "constant": true,
      "inputs": [],
      "name": "period",
      "outputs": [
        {
          "name": "",
          "type": "address"
        }
      ],
      "payable": false,
      "stateMutability": "view",
      "type": "function"
    },
    {
      "constant": false,
      "inputs": [
        {
          "name": "newOwner",
          "type": "address"
        }
      ],
      "name": "transferOwnership",
      "outputs": [],
      "payable": false,
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "name": "_T",
          "type": "uint256"
        }
      ],
      "payable": false,
      "stateMutability": "nonpayable",
      "type": "constructor"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "name": "previousOwner",
          "type": "address"
        },
        {
          "indexed": true,
          "name": "newOwner",
          "type": "address"
        }
      ],
      "name": "OwnershipTransferred",
      "type": "event"
    },
    {
      "constant": false,
      "inputs": [
        {
          "name": "_T",
          "type": "uint256"
        }
      ],
      "name": "setPeriodLength",
      "outputs": [],
      "payable": false,
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "constant": false,
      "inputs": [
        {
          "name": "_duration",
          "type": "uint256"
        }
      ],
      "name": "pushStage",
      "outputs": [],
      "payable": false,
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "constant": true,
      "inputs": [],
      "name": "currentStage",
      "outputs": [
        {
          "name": "",
          "type": "uint256"
        }
      ],
      "payable": false,
      "stateMutability": "view",
      "type": "function"
    }
  ],
  "bytecode": "0x608060405234801561001057600080fd5b5060405160208061228b83398101806040528101908080519060200190929190505050336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806100f86101d5565b80828152602001915050604051809103906000f08015801561011e573d6000803e3d6000fd5b50600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550806101686101e5565b80828152602001915050604051809103906000f08015801561018e573d6000803e3d6000fd5b50600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506101f5565b604051610b1d80610cb083390190565b604051610abe806117cd83390190565b610aac806102046000396000f300608060405260043610610099576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063138ef1511461009e5780631c5633d7146100f55780635bf5d54c14610122578063715018a61461014d578063842652a6146101645780638da5cb5b146101915780638f32d59b146101e8578063ef78d4fd14610217578063f2fde38b1461026e575b600080fd5b3480156100aa57600080fd5b506100b36102b1565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561010157600080fd5b50610120600480360381019080803590602001909291905050506102d7565b005b34801561012e57600080fd5b50610137610462565b6040518082815260200191505060405180910390f35b34801561015957600080fd5b50610162610702565b005b34801561017057600080fd5b5061018f600480360381019080803590602001909291905050506107d4565b005b34801561019d57600080fd5b506101a66108c1565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156101f457600080fd5b506101fd6108ea565b604051808215151515815260200191505060405180910390f35b34801561022357600080fd5b5061022c610941565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561027a57600080fd5b506102af600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610967565b005b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6102df6108c1565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561031857600080fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f2a75fe46040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401600060405180830381600087803b15801561039e57600080fd5b505af11580156103b2573d6000803e3d6000fd5b50505050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16631c5633d7826040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b15801561044757600080fd5b505af115801561045b573d6000803e3d6000fd5b5050505050565b600080600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dd6239fc6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156104ee57600080fd5b505af1158015610502573d6000803e3d6000fd5b505050506040513d602081101561051857600080fd5b81019080805190602001909291905050509250600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630ef267436040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156105b157600080fd5b505af11580156105c5573d6000803e3d6000fd5b505050506040513d60208110156105db57600080fd5b81019080805190602001909291905050509150600082141561060057600093506106fc565b600090505b818110156106fb57600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636f54dce582856040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083815260200182815260200192505050602060405180830381600087803b1580156106a657600080fd5b505af11580156106ba573d6000803e3d6000fd5b505050506040513d60208110156106d057600080fd5b8101908080519060200190929190505050156106ee578093506106fc565b8080600101915050610605565b5b50505090565b61070a6108ea565b151561071557600080fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6107dc6108c1565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561081557600080fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663959ac484826040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b1580156108a657600080fd5b505af11580156108ba573d6000803e3d6000fd5b5050505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614905090565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61096f6108ea565b151561097a57600080fd5b61098381610986565b50565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515156109c257600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505600a165627a7a723058202957a440f90d2d5bc522edf3ec329f21611ae346b85834009f4788953cae93400029608060405234801561001057600080fd5b50604051602080610b1d83398101806040528101908080519060200190929190505050336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a38060048190555050610a17806101066000396000f3006080604052600436106100c5576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680630ef26743146100ca5780632f91f1f4146100f55780634a720f27146101205780635439e423146101615780636f54dce51461018c578063715018a6146101db5780638da5cb5b146101f25780638f32d59b14610249578063959ac48414610278578063a4ece52c146102a5578063b1becf2a146102bc578063f2a75fe4146102fd578063f2fde38b14610314575b600080fd5b3480156100d657600080fd5b506100df610357565b6040518082815260200191505060405180910390f35b34801561010157600080fd5b5061010a610361565b6040518082815260200191505060405180910390f35b34801561012c57600080fd5b5061014b60048036038101908080359060200190929190505050610367565b6040518082815260200191505060405180910390f35b34801561016d57600080fd5b5061017661038a565b6040518082815260200191505060405180910390f35b34801561019857600080fd5b506101c16004803603810190808035906020019092919080359060200190929190505050610390565b604051808215151515815260200191505060405180910390f35b3480156101e757600080fd5b506101f061040b565b005b3480156101fe57600080fd5b506102076104dd565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561025557600080fd5b5061025e610506565b604051808215151515815260200191505060405180910390f35b34801561028457600080fd5b506102a36004803603810190808035906020019092919050505061055d565b005b3480156102b157600080fd5b506102ba610681565b005b3480156102c857600080fd5b506102e7600480360381019080803590602001909291905050506107e6565b6040518082815260200191505060405180910390f35b34801561030957600080fd5b506103126107fe565b005b34801561032057600080fd5b50610355600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610881565b005b6000600554905090565b60045481565b60018181548110151561037657fe5b906000526020600020016000915090505481565b60035481565b6000808314156103be576001838154811015156103a957fe5b90600052602060002001548211159050610405565b60018084038154811015156103cf57fe5b9060005260206000200154821015801561040257506001838154811015156103f357fe5b90600052602060002001548211155b90505b92915050565b610413610506565b151561041e57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614905090565b6105656104dd565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561059e57600080fd5b60045481600354011115151561061c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f424c4f434b5f4e554d5f4f564552464c4f57000000000000000000000000000081525060200191505060405180910390fd5b600181600354019080600181540180825580915050906001820390600052602060002001600090919290919091505550806003600082825401925050819055506005600081548092919060010191905055506004546003541115151561067e57fe5b50565b600061068b6104dd565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156106c457600080fd5b6000600180549050111515610741576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600d8152602001807f454d5054592053544f524147450000000000000000000000000000000000000081525060200191505060405180910390fd5b60018080805490500381548110151561075657fe5b9060005260206000200154905060018080805490500381548110151561077857fe5b9060005260206000200160009055600180548091906001900361079b919061099a565b50600060018054905014156107bf57600060058190555060006003819055506107e3565b60056000815480929190600190039190505550806003600082825403925050819055505b50565b60026020528060005260406000206000915090505481565b6000806108096104dd565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561084257600080fd5b6001805490509150600090505b8181101561086c5761085f610681565b808060010191505061084f565b600060018054905014151561087d57fe5b5050565b610889610506565b151561089457600080fd5b61089d816108a0565b50565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515156108dc57600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b8154818355818111156109c1578183600052602060002091820191016109c091906109c6565b5b505050565b6109e891905b808211156109e45760008160009055506001016109cc565b5090565b905600a165627a7a723058203a3e89de096ccb22cb10fe208000abd307b88e2b2727b0d03714ce7c52c4b83b0029608060405234801561001057600080fd5b50604051602080610abe83398101806040528101908080519060200190929190505050336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3600081111515610167576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f454d5054595f504552494f44000000000000000000000000000000000000000081525060200191505060405180910390fd5b436004819055508060018190555050610939806101856000396000f300608060405260043610610107576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680630ef267431461010c5780631c5633d714610137578063262a9dff146101645780632bc80f3a1461018f57806346bf6a55146101ba5780634c1ce7b4146101e55780634d3a67751461021057806355569a2f1461023b578063715018a61461026a578063731b3a03146102815780637fc15a2e146102ac5780638da5cb5b146102d75780638f32d59b1461032e578063a091fd6b1461035d578063b9f7fb291461038a578063be1c766b146103b5578063dd6239fc146103e0578063f2fde38b1461040b578063f866dd821461044e575b600080fd5b34801561011857600080fd5b50610121610479565b6040518082815260200191505060405180910390f35b34801561014357600080fd5b50610162600480360381019080803590602001909291905050506104b2565b005b34801561017057600080fd5b5061017961053d565b6040518082815260200191505060405180910390f35b34801561019b57600080fd5b506101a4610543565b6040518082815260200191505060405180910390f35b3480156101c657600080fd5b506101cf610549565b6040518082815260200191505060405180910390f35b3480156101f157600080fd5b506101fa61054f565b6040518082815260200191505060405180910390f35b34801561021c57600080fd5b50610225610580565b6040518082815260200191505060405180910390f35b34801561024757600080fd5b506102506105b3565b604051808215151515815260200191505060405180910390f35b34801561027657600080fd5b5061027f6105bf565b005b34801561028d57600080fd5b50610296610691565b6040518082815260200191505060405180910390f35b3480156102b857600080fd5b506102c16106ae565b6040518082815260200191505060405180910390f35b3480156102e357600080fd5b506102ec6106bd565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561033a57600080fd5b506103436106e6565b604051808215151515815260200191505060405180910390f35b34801561036957600080fd5b506103886004803603810190808035906020019092919050505061073d565b005b34801561039657600080fd5b5061039f6107b8565b6040518082815260200191505060405180910390f35b3480156103c157600080fd5b506103ca6107be565b6040518082815260200191505060405180910390f35b3480156103ec57600080fd5b506103f56107dd565b6040518082815260200191505060405180910390f35b34801561041757600080fd5b5061044c600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506107ee565b005b34801561045a57600080fd5b5061046361080d565b6040518082815260200191505060405180910390f35b60006104836105b3565b156104925760055490506104af565b60025460055460015460045443038115156104a957fe5b04010190505b90565b60006104bc6106bd565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156104f557600080fd5b6104fd610479565b90506001610509610691565b0160048190555080600581905550600260008154809291906001019190505550600154600381905550816001819055505050565b60025481565b60015481565b60045481565b60006105596105b3565b1561056857600554905061057d565b600154600454430381151561057957fe5b0490505b90565b600061058a6105b3565b1561059d576003546004540390506105b0565b6001546105a861054f565b026004540190505b90565b60004360045411905090565b6105c76106e6565b15156105d257600080fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6000600161069d6107dd565b6106a56107be565b43010303905090565b60006106b8610479565b905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614905090565b6107456106bd565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561077e57600080fd5b610786610479565b600581905550436004819055506002600081548092919060010191905055506001546003819055508060018190555050565b60035481565b60004360045411156107d45760035490506107da565b60015490505b90565b60006107e7610580565b4303905090565b6107f66106e6565b151561080157600080fd5b61080a81610813565b50565b60055481565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415151561084f57600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505600a165627a7a7230582036336430d11e09bdd6c1a64b8bdc2dcb625a03cec66275202098348aa560ac050029",
  "deployedBytecode": "0x608060405260043610610099576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063138ef1511461009e5780631c5633d7146100f55780635bf5d54c14610122578063715018a61461014d578063842652a6146101645780638da5cb5b146101915780638f32d59b146101e8578063ef78d4fd14610217578063f2fde38b1461026e575b600080fd5b3480156100aa57600080fd5b506100b36102b1565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561010157600080fd5b50610120600480360381019080803590602001909291905050506102d7565b005b34801561012e57600080fd5b50610137610462565b6040518082815260200191505060405180910390f35b34801561015957600080fd5b50610162610702565b005b34801561017057600080fd5b5061018f600480360381019080803590602001909291905050506107d4565b005b34801561019d57600080fd5b506101a66108c1565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156101f457600080fd5b506101fd6108ea565b604051808215151515815260200191505060405180910390f35b34801561022357600080fd5b5061022c610941565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561027a57600080fd5b506102af600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610967565b005b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6102df6108c1565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561031857600080fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f2a75fe46040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401600060405180830381600087803b15801561039e57600080fd5b505af11580156103b2573d6000803e3d6000fd5b50505050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16631c5633d7826040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b15801561044757600080fd5b505af115801561045b573d6000803e3d6000fd5b5050505050565b600080600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dd6239fc6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156104ee57600080fd5b505af1158015610502573d6000803e3d6000fd5b505050506040513d602081101561051857600080fd5b81019080805190602001909291905050509250600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630ef267436040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156105b157600080fd5b505af11580156105c5573d6000803e3d6000fd5b505050506040513d60208110156105db57600080fd5b81019080805190602001909291905050509150600082141561060057600093506106fc565b600090505b818110156106fb57600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636f54dce582856040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083815260200182815260200192505050602060405180830381600087803b1580156106a657600080fd5b505af11580156106ba573d6000803e3d6000fd5b505050506040513d60208110156106d057600080fd5b8101908080519060200190929190505050156106ee578093506106fc565b8080600101915050610605565b5b50505090565b61070a6108ea565b151561071557600080fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6107dc6108c1565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561081557600080fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663959ac484826040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b1580156108a657600080fd5b505af11580156108ba573d6000803e3d6000fd5b5050505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614905090565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61096f6108ea565b151561097a57600080fd5b61098381610986565b50565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515156109c257600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505600a165627a7a723058202957a440f90d2d5bc522edf3ec329f21611ae346b85834009f4788953cae93400029",
  "sourceMap": "285:1265:4:-;;;585:103;8:9:-1;5:2;;;30:1;27;20:12;5:2;585:103:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;518:10:11;509:6;;:19;;;;;;;;;;;;;;;;;;572:6;;;;;;;;;;;539:40;;568:1;539:40;;;;;;;;;;;;644:2:4;634:13;;:::i;:::-;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;634:13:4;626:5;;:21;;;;;;;;;;;;;;;;;;678:2;666:15;;:::i;:::-;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;666:15:4;657:6;;:24;;;;;;;;;;;;;;;;;;585:103;285:1265;;;;;;;;;;;;:::o;:::-;;;;;;;;;;:::o;:::-;;;;;;;",
  "deployedSourceMap": "285:1265:4:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;422:18;;8:9:-1;5:2;;;30:1;27;20:12;5:2;422:18:4;;;;;;;;;;;;;;;;;;;;;;;;;;;694:150;;8:9:-1;5:2;;;30:1;27;20:12;5:2;694:150:4;;;;;;;;;;;;;;;;;;;;;;;;;;1178:369;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1178:369:4;;;;;;;;;;;;;;;;;;;;;;;1273:127:11;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1273:127:11;;;;;;850:123:4;;8:9:-1;5:2;;;30:1;27;20:12;5:2;850:123:4;;;;;;;;;;;;;;;;;;;;;;;;;;639:70:11;;8:9:-1;5:2;;;30:1;27;20:12;5:2;639:70:11;;;;;;;;;;;;;;;;;;;;;;;;;;;926:83;;8:9:-1;5:2;;;30:1;27;20:12;5:2;926:83:11;;;;;;;;;;;;;;;;;;;;;;;;;;;396:20:4;;8:9:-1;5:2;;;30:1;27;20:12;5:2;396:20:4;;;;;;;;;;;;;;;;;;;;;;;;;;;1561:101:11;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1561:101:11;;;;;;;;;;;;;;;;;;;;;;;;;;;;422:18:4;;;;;;;;;;;;;:::o;694:150::-;770:7;:5;:7::i;:::-;756:21;;:10;:21;;;748:30;;;;;;;;788:5;;;;;;;;;;;:11;;;:13;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;788:13:4;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;788:13:4;;;;811:6;;;;;;;;;;;:22;;;834:2;811:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;811:26:4;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;811:26:4;;;;694:150;:::o;1178:369::-;1223:7;1242:21;1301:12;1401:6;1266;;;;;;;;;;;:23;;;:25;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1266:25:4;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1266:25:4;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;1266:25:4;;;;;;;;;;;;;;;;1242:49;;1316:5;;;;;;;;;;;:12;;;:14;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1316:14:4;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1316:14:4;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;1316:14:4;;;;;;;;;;;;;;;;1301:29;;1351:1;1343:4;:9;1340:47;;;1375:1;1368:8;;;;1340:47;1410:1;1401:10;;1396:145;1418:4;1414:1;:8;1396:145;;;1447:5;;;;;;;;;;;:22;;;1470:1;1473:13;1447:40;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1447:40:4;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1447:40:4;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;1447:40:4;;;;;;;;;;;;;;;;1443:87;;;1514:1;1507:8;;;;1443:87;1424:3;;;;;;;1396:145;;;1178:369;;;;;:::o;1273:127:11:-;824:9;:7;:9::i;:::-;816:18;;;;;;;;1367:1;1330:40;;1351:6;;;;;;;;;;;1330:40;;;;;;;;;;;;1393:1;1376:6;;:19;;;;;;;;;;;;;;;;;;1273:127::o;850:123:4:-;927:7;:5;:7::i;:::-;913:21;;:10;:21;;;905:30;;;;;;;;945:5;;;;;;;;;;;:10;;;956:9;945:21;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;945:21:4;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;945:21:4;;;;850:123;:::o;639:70:11:-;676:7;698:6;;;;;;;;;;;691:13;;639:70;:::o;926:83::-;965:4;998:6;;;;;;;;;;;984:20;;:10;:20;;;977:27;;926:83;:::o;396:20:4:-;;;;;;;;;;;;;:::o;1561:101:11:-;824:9;:7;:9::i;:::-;816:18;;;;;;;;1629:28;1648:8;1629:18;:28::i;:::-;1561:101;:::o;1796:169::-;1885:1;1865:22;;:8;:22;;;;1857:31;;;;;;;;1928:8;1899:38;;1920:6;;;;;;;;;;;1899:38;;;;;;;;;;;;1952:8;1943:6;;:17;;;;;;;;;;;;;;;;;;1796:169;:::o",
  "source": "pragma solidity 0.4.24;\n\nimport \"openzeppelin-solidity/contracts/math/SafeMath.sol\";\nimport \"openzeppelin-solidity/contracts/ownership/Ownable.sol\";\nimport \"./Stack.sol\";\nimport \"./Period.sol\";\n\n/**\n*  A periodic contract. Enables any contract to change state on a periodic basis\n**/\n\ncontract PeriodicStages is Ownable {\n    using SafeMath for uint256;\n\n    // Set of stages inside a Period\n    Period public period;\n    Stack public stack;\n\n    /**\n    * Constructor. Sets up a new period, initializes the offset.\n    * @param _T Initial number of blocks for the period\n    **/\n\n    constructor(uint256 _T) public {\n        stack = new Stack(_T);\n        period = new Period (_T);\n    }\n\n    function setPeriodLength(uint256 _T) public {\n        require(msg.sender == owner());\n        stack.empty();\n        period.setPeriodLength(_T);\n    }\n\n    function pushStage(uint256 _duration) public {\n        require(msg.sender == owner());\n        stack.push(_duration);\n    }\n\n    /**\n    * Getter for the current Stage inside a period where we are, given the current block\n    * @return Current stage inside a period, using the internal Index of the given period\n    */\n    \n    function currentStage() public view returns (uint256) {\n        uint256 internalBlock = period.getRelativeIndex();\n        uint256 size = stack.height();\n        if(size == 0) {\n            return 0;\n        }\n        for (uint i = 0 ; i < size; i++) {\n            if (stack.positionIsOnSlot(i, internalBlock)) {\n                return i;\n            } \n        }\n    }\n\n}\n",
  "sourcePath": "/Users/carlosbuendia/Documents/Projects/consensys/Frontier/cron/contracts/blocks/PeriodicStages.sol",
  "ast": {
    "absolutePath": "/Users/carlosbuendia/Documents/Projects/consensys/Frontier/cron/contracts/blocks/PeriodicStages.sol",
    "exportedSymbols": {
      "PeriodicStages": [
        491
      ]
    },
    "id": 492,
    "nodeType": "SourceUnit",
    "nodes": [
      {
        "id": 366,
        "literals": [
          "solidity",
          "0.4",
          ".24"
        ],
        "nodeType": "PragmaDirective",
        "src": "0:23:4"
      },
      {
        "absolutePath": "openzeppelin-solidity/contracts/math/SafeMath.sol",
        "file": "openzeppelin-solidity/contracts/math/SafeMath.sol",
        "id": 367,
        "nodeType": "ImportDirective",
        "scope": 492,
        "sourceUnit": 1861,
        "src": "25:59:4",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "absolutePath": "openzeppelin-solidity/contracts/ownership/Ownable.sol",
        "file": "openzeppelin-solidity/contracts/ownership/Ownable.sol",
        "id": 368,
        "nodeType": "ImportDirective",
        "scope": 492,
        "sourceUnit": 1970,
        "src": "85:63:4",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "absolutePath": "/Users/carlosbuendia/Documents/Projects/consensys/Frontier/cron/contracts/blocks/Stack.sol",
        "file": "./Stack.sol",
        "id": 369,
        "nodeType": "ImportDirective",
        "scope": 492,
        "sourceUnit": 715,
        "src": "149:21:4",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "absolutePath": "/Users/carlosbuendia/Documents/Projects/consensys/Frontier/cron/contracts/blocks/Period.sol",
        "file": "./Period.sol",
        "id": 370,
        "nodeType": "ImportDirective",
        "scope": 492,
        "sourceUnit": 365,
        "src": "171:22:4",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "baseContracts": [
          {
            "arguments": null,
            "baseName": {
              "contractScope": null,
              "id": 371,
              "name": "Ownable",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 1969,
              "src": "312:7:4",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_Ownable_$1969",
                "typeString": "contract Ownable"
              }
            },
            "id": 372,
            "nodeType": "InheritanceSpecifier",
            "src": "312:7:4"
          }
        ],
        "contractDependencies": [
          364,
          714,
          1969
        ],
        "contractKind": "contract",
        "documentation": " A periodic contract. Enables any contract to change state on a periodic basis*",
        "fullyImplemented": true,
        "id": 491,
        "linearizedBaseContracts": [
          491,
          1969
        ],
        "name": "PeriodicStages",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "id": 375,
            "libraryName": {
              "contractScope": null,
              "id": 373,
              "name": "SafeMath",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 1860,
              "src": "332:8:4",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_SafeMath_$1860",
                "typeString": "library SafeMath"
              }
            },
            "nodeType": "UsingForDirective",
            "src": "326:27:4",
            "typeName": {
              "id": 374,
              "name": "uint256",
              "nodeType": "ElementaryTypeName",
              "src": "345:7:4",
              "typeDescriptions": {
                "typeIdentifier": "t_uint256",
                "typeString": "uint256"
              }
            }
          },
          {
            "constant": false,
            "id": 377,
            "name": "period",
            "nodeType": "VariableDeclaration",
            "scope": 491,
            "src": "396:20:4",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_contract$_Period_$364",
              "typeString": "contract Period"
            },
            "typeName": {
              "contractScope": null,
              "id": 376,
              "name": "Period",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 364,
              "src": "396:6:4",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_Period_$364",
                "typeString": "contract Period"
              }
            },
            "value": null,
            "visibility": "public"
          },
          {
            "constant": false,
            "id": 379,
            "name": "stack",
            "nodeType": "VariableDeclaration",
            "scope": 491,
            "src": "422:18:4",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_contract$_Stack_$714",
              "typeString": "contract Stack"
            },
            "typeName": {
              "contractScope": null,
              "id": 378,
              "name": "Stack",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 714,
              "src": "422:5:4",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_Stack_$714",
                "typeString": "contract Stack"
              }
            },
            "value": null,
            "visibility": "public"
          },
          {
            "body": {
              "id": 398,
              "nodeType": "Block",
              "src": "616:72:4",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 389,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 384,
                      "name": "stack",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 379,
                      "src": "626:5:4",
                      "typeDescriptions": {
                        "typeIdentifier": "t_contract$_Stack_$714",
                        "typeString": "contract Stack"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "id": 387,
                          "name": "_T",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 381,
                          "src": "644:2:4",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        ],
                        "id": 386,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "nodeType": "NewExpression",
                        "src": "634:9:4",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_creation_nonpayable$_t_uint256_$returns$_t_contract$_Stack_$714_$",
                          "typeString": "function (uint256) returns (contract Stack)"
                        },
                        "typeName": {
                          "contractScope": null,
                          "id": 385,
                          "name": "Stack",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 714,
                          "src": "638:5:4",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_Stack_$714",
                            "typeString": "contract Stack"
                          }
                        }
                      },
                      "id": 388,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "634:13:4",
                      "typeDescriptions": {
                        "typeIdentifier": "t_contract$_Stack_$714",
                        "typeString": "contract Stack"
                      }
                    },
                    "src": "626:21:4",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_Stack_$714",
                      "typeString": "contract Stack"
                    }
                  },
                  "id": 390,
                  "nodeType": "ExpressionStatement",
                  "src": "626:21:4"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 396,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 391,
                      "name": "period",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 377,
                      "src": "657:6:4",
                      "typeDescriptions": {
                        "typeIdentifier": "t_contract$_Period_$364",
                        "typeString": "contract Period"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "id": 394,
                          "name": "_T",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 381,
                          "src": "678:2:4",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        ],
                        "id": 393,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "nodeType": "NewExpression",
                        "src": "666:10:4",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_creation_nonpayable$_t_uint256_$returns$_t_contract$_Period_$364_$",
                          "typeString": "function (uint256) returns (contract Period)"
                        },
                        "typeName": {
                          "contractScope": null,
                          "id": 392,
                          "name": "Period",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 364,
                          "src": "670:6:4",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_Period_$364",
                            "typeString": "contract Period"
                          }
                        }
                      },
                      "id": 395,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "666:15:4",
                      "typeDescriptions": {
                        "typeIdentifier": "t_contract$_Period_$364",
                        "typeString": "contract Period"
                      }
                    },
                    "src": "657:24:4",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_Period_$364",
                      "typeString": "contract Period"
                    }
                  },
                  "id": 397,
                  "nodeType": "ExpressionStatement",
                  "src": "657:24:4"
                }
              ]
            },
            "documentation": "Constructor. Sets up a new period, initializes the offset.\n@param _T Initial number of blocks for the period*",
            "id": 399,
            "implemented": true,
            "isConstructor": true,
            "isDeclaredConst": false,
            "modifiers": [],
            "name": "",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 382,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 381,
                  "name": "_T",
                  "nodeType": "VariableDeclaration",
                  "scope": 399,
                  "src": "597:10:4",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 380,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "597:7:4",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "596:12:4"
            },
            "payable": false,
            "returnParameters": {
              "id": 383,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "616:0:4"
            },
            "scope": 491,
            "src": "585:103:4",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "public"
          },
          {
            "body": {
              "id": 423,
              "nodeType": "Block",
              "src": "738:106:4",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "id": 409,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 405,
                            "name": "msg",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1984,
                            "src": "756:3:4",
                            "typeDescriptions": {
                              "typeIdentifier": "t_magic_message",
                              "typeString": "msg"
                            }
                          },
                          "id": 406,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "sender",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": null,
                          "src": "756:10:4",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "==",
                        "rightExpression": {
                          "argumentTypes": null,
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "id": 407,
                            "name": "owner",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1894,
                            "src": "770:5:4",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$",
                              "typeString": "function () view returns (address)"
                            }
                          },
                          "id": 408,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "770:7:4",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "src": "756:21:4",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      ],
                      "id": 404,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        1987,
                        1988
                      ],
                      "referencedDeclaration": 1987,
                      "src": "748:7:4",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
                        "typeString": "function (bool) pure"
                      }
                    },
                    "id": 410,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "748:30:4",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 411,
                  "nodeType": "ExpressionStatement",
                  "src": "748:30:4"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [],
                    "expression": {
                      "argumentTypes": [],
                      "expression": {
                        "argumentTypes": null,
                        "id": 412,
                        "name": "stack",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 379,
                        "src": "788:5:4",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_Stack_$714",
                          "typeString": "contract Stack"
                        }
                      },
                      "id": 414,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "empty",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 676,
                      "src": "788:11:4",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_external_nonpayable$__$returns$__$",
                        "typeString": "function () external"
                      }
                    },
                    "id": 415,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "788:13:4",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 416,
                  "nodeType": "ExpressionStatement",
                  "src": "788:13:4"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 420,
                        "name": "_T",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 401,
                        "src": "834:2:4",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "expression": {
                        "argumentTypes": null,
                        "id": 417,
                        "name": "period",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 377,
                        "src": "811:6:4",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_Period_$364",
                          "typeString": "contract Period"
                        }
                      },
                      "id": 419,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "setPeriodLength",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 194,
                      "src": "811:22:4",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$",
                        "typeString": "function (uint256) external"
                      }
                    },
                    "id": 421,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "811:26:4",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 422,
                  "nodeType": "ExpressionStatement",
                  "src": "811:26:4"
                }
              ]
            },
            "documentation": null,
            "id": 424,
            "implemented": true,
            "isConstructor": false,
            "isDeclaredConst": false,
            "modifiers": [],
            "name": "setPeriodLength",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 402,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 401,
                  "name": "_T",
                  "nodeType": "VariableDeclaration",
                  "scope": 424,
                  "src": "719:10:4",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 400,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "719:7:4",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "718:12:4"
            },
            "payable": false,
            "returnParameters": {
              "id": 403,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "738:0:4"
            },
            "scope": 491,
            "src": "694:150:4",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "public"
          },
          {
            "body": {
              "id": 443,
              "nodeType": "Block",
              "src": "895:78:4",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "id": 434,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 430,
                            "name": "msg",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1984,
                            "src": "913:3:4",
                            "typeDescriptions": {
                              "typeIdentifier": "t_magic_message",
                              "typeString": "msg"
                            }
                          },
                          "id": 431,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "sender",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": null,
                          "src": "913:10:4",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "==",
                        "rightExpression": {
                          "argumentTypes": null,
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "id": 432,
                            "name": "owner",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1894,
                            "src": "927:5:4",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$",
                              "typeString": "function () view returns (address)"
                            }
                          },
                          "id": 433,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "927:7:4",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "src": "913:21:4",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      ],
                      "id": 429,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        1987,
                        1988
                      ],
                      "referencedDeclaration": 1987,
                      "src": "905:7:4",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
                        "typeString": "function (bool) pure"
                      }
                    },
                    "id": 435,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "905:30:4",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 436,
                  "nodeType": "ExpressionStatement",
                  "src": "905:30:4"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 440,
                        "name": "_duration",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 426,
                        "src": "956:9:4",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "expression": {
                        "argumentTypes": null,
                        "id": 437,
                        "name": "stack",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 379,
                        "src": "945:5:4",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_Stack_$714",
                          "typeString": "contract Stack"
                        }
                      },
                      "id": 439,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "push",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 573,
                      "src": "945:10:4",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$",
                        "typeString": "function (uint256) external"
                      }
                    },
                    "id": 441,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "945:21:4",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 442,
                  "nodeType": "ExpressionStatement",
                  "src": "945:21:4"
                }
              ]
            },
            "documentation": null,
            "id": 444,
            "implemented": true,
            "isConstructor": false,
            "isDeclaredConst": false,
            "modifiers": [],
            "name": "pushStage",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 427,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 426,
                  "name": "_duration",
                  "nodeType": "VariableDeclaration",
                  "scope": 444,
                  "src": "869:17:4",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 425,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "869:7:4",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "868:19:4"
            },
            "payable": false,
            "returnParameters": {
              "id": 428,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "895:0:4"
            },
            "scope": 491,
            "src": "850:123:4",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "public"
          },
          {
            "body": {
              "id": 489,
              "nodeType": "Block",
              "src": "1232:315:4",
              "statements": [
                {
                  "assignments": [
                    450
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 450,
                      "name": "internalBlock",
                      "nodeType": "VariableDeclaration",
                      "scope": 490,
                      "src": "1242:21:4",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 449,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "1242:7:4",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 454,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [],
                    "expression": {
                      "argumentTypes": [],
                      "expression": {
                        "argumentTypes": null,
                        "id": 451,
                        "name": "period",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 377,
                        "src": "1266:6:4",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_Period_$364",
                          "typeString": "contract Period"
                        }
                      },
                      "id": 452,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "getRelativeIndex",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 352,
                      "src": "1266:23:4",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$",
                        "typeString": "function () view external returns (uint256)"
                      }
                    },
                    "id": 453,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1266:25:4",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "1242:49:4"
                },
                {
                  "assignments": [
                    456
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 456,
                      "name": "size",
                      "nodeType": "VariableDeclaration",
                      "scope": 490,
                      "src": "1301:12:4",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 455,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "1301:7:4",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 460,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [],
                    "expression": {
                      "argumentTypes": [],
                      "expression": {
                        "argumentTypes": null,
                        "id": 457,
                        "name": "stack",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 379,
                        "src": "1316:5:4",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_Stack_$714",
                          "typeString": "contract Stack"
                        }
                      },
                      "id": 458,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "height",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 528,
                      "src": "1316:12:4",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$",
                        "typeString": "function () view external returns (uint256)"
                      }
                    },
                    "id": 459,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1316:14:4",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "1301:29:4"
                },
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 463,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 461,
                      "name": "size",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 456,
                      "src": "1343:4:4",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "==",
                    "rightExpression": {
                      "argumentTypes": null,
                      "hexValue": "30",
                      "id": 462,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "1351:1:4",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_0_by_1",
                        "typeString": "int_const 0"
                      },
                      "value": "0"
                    },
                    "src": "1343:9:4",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 467,
                  "nodeType": "IfStatement",
                  "src": "1340:47:4",
                  "trueBody": {
                    "id": 466,
                    "nodeType": "Block",
                    "src": "1354:33:4",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "hexValue": "30",
                          "id": 464,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "number",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "1375:1:4",
                          "subdenomination": null,
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_0_by_1",
                            "typeString": "int_const 0"
                          },
                          "value": "0"
                        },
                        "functionReturnParameters": 448,
                        "id": 465,
                        "nodeType": "Return",
                        "src": "1368:8:4"
                      }
                    ]
                  }
                },
                {
                  "body": {
                    "id": 487,
                    "nodeType": "Block",
                    "src": "1429:112:4",
                    "statements": [
                      {
                        "condition": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "id": 480,
                              "name": "i",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 469,
                              "src": "1470:1:4",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "id": 481,
                              "name": "internalBlock",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 450,
                              "src": "1473:13:4",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "argumentTypes": null,
                              "id": 478,
                              "name": "stack",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 379,
                              "src": "1447:5:4",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_Stack_$714",
                                "typeString": "contract Stack"
                              }
                            },
                            "id": 479,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "positionIsOnSlot",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 713,
                            "src": "1447:22:4",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_external_view$_t_uint256_$_t_uint256_$returns$_t_bool_$",
                              "typeString": "function (uint256,uint256) view external returns (bool)"
                            }
                          },
                          "id": 482,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1447:40:4",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "falseBody": null,
                        "id": 486,
                        "nodeType": "IfStatement",
                        "src": "1443:87:4",
                        "trueBody": {
                          "id": 485,
                          "nodeType": "Block",
                          "src": "1489:41:4",
                          "statements": [
                            {
                              "expression": {
                                "argumentTypes": null,
                                "id": 483,
                                "name": "i",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 469,
                                "src": "1514:1:4",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "functionReturnParameters": 448,
                              "id": 484,
                              "nodeType": "Return",
                              "src": "1507:8:4"
                            }
                          ]
                        }
                      }
                    ]
                  },
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 474,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 472,
                      "name": "i",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 469,
                      "src": "1414:1:4",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "<",
                    "rightExpression": {
                      "argumentTypes": null,
                      "id": 473,
                      "name": "size",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 456,
                      "src": "1418:4:4",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "1414:8:4",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 488,
                  "initializationExpression": {
                    "assignments": [
                      469
                    ],
                    "declarations": [
                      {
                        "constant": false,
                        "id": 469,
                        "name": "i",
                        "nodeType": "VariableDeclaration",
                        "scope": 490,
                        "src": "1401:6:4",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 468,
                          "name": "uint",
                          "nodeType": "ElementaryTypeName",
                          "src": "1401:4:4",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "value": null,
                        "visibility": "internal"
                      }
                    ],
                    "id": 471,
                    "initialValue": {
                      "argumentTypes": null,
                      "hexValue": "30",
                      "id": 470,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "1410:1:4",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_0_by_1",
                        "typeString": "int_const 0"
                      },
                      "value": "0"
                    },
                    "nodeType": "VariableDeclarationStatement",
                    "src": "1401:10:4"
                  },
                  "loopExpression": {
                    "expression": {
                      "argumentTypes": null,
                      "id": 476,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "nodeType": "UnaryOperation",
                      "operator": "++",
                      "prefix": false,
                      "src": "1424:3:4",
                      "subExpression": {
                        "argumentTypes": null,
                        "id": 475,
                        "name": "i",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 469,
                        "src": "1424:1:4",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "id": 477,
                    "nodeType": "ExpressionStatement",
                    "src": "1424:3:4"
                  },
                  "nodeType": "ForStatement",
                  "src": "1396:145:4"
                }
              ]
            },
            "documentation": "Getter for the current Stage inside a period where we are, given the current block\n@return Current stage inside a period, using the internal Index of the given period",
            "id": 490,
            "implemented": true,
            "isConstructor": false,
            "isDeclaredConst": true,
            "modifiers": [],
            "name": "currentStage",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 445,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "1199:2:4"
            },
            "payable": false,
            "returnParameters": {
              "id": 448,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 447,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 490,
                  "src": "1223:7:4",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 446,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1223:7:4",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1222:9:4"
            },
            "scope": 491,
            "src": "1178:369:4",
            "stateMutability": "view",
            "superFunction": null,
            "visibility": "public"
          }
        ],
        "scope": 492,
        "src": "285:1265:4"
      }
    ],
    "src": "0:1551:4"
  },
  "legacyAST": {
    "absolutePath": "/Users/carlosbuendia/Documents/Projects/consensys/Frontier/cron/contracts/blocks/PeriodicStages.sol",
    "exportedSymbols": {
      "PeriodicStages": [
        491
      ]
    },
    "id": 492,
    "nodeType": "SourceUnit",
    "nodes": [
      {
        "id": 366,
        "literals": [
          "solidity",
          "0.4",
          ".24"
        ],
        "nodeType": "PragmaDirective",
        "src": "0:23:4"
      },
      {
        "absolutePath": "openzeppelin-solidity/contracts/math/SafeMath.sol",
        "file": "openzeppelin-solidity/contracts/math/SafeMath.sol",
        "id": 367,
        "nodeType": "ImportDirective",
        "scope": 492,
        "sourceUnit": 1861,
        "src": "25:59:4",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "absolutePath": "openzeppelin-solidity/contracts/ownership/Ownable.sol",
        "file": "openzeppelin-solidity/contracts/ownership/Ownable.sol",
        "id": 368,
        "nodeType": "ImportDirective",
        "scope": 492,
        "sourceUnit": 1970,
        "src": "85:63:4",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "absolutePath": "/Users/carlosbuendia/Documents/Projects/consensys/Frontier/cron/contracts/blocks/Stack.sol",
        "file": "./Stack.sol",
        "id": 369,
        "nodeType": "ImportDirective",
        "scope": 492,
        "sourceUnit": 715,
        "src": "149:21:4",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "absolutePath": "/Users/carlosbuendia/Documents/Projects/consensys/Frontier/cron/contracts/blocks/Period.sol",
        "file": "./Period.sol",
        "id": 370,
        "nodeType": "ImportDirective",
        "scope": 492,
        "sourceUnit": 365,
        "src": "171:22:4",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "baseContracts": [
          {
            "arguments": null,
            "baseName": {
              "contractScope": null,
              "id": 371,
              "name": "Ownable",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 1969,
              "src": "312:7:4",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_Ownable_$1969",
                "typeString": "contract Ownable"
              }
            },
            "id": 372,
            "nodeType": "InheritanceSpecifier",
            "src": "312:7:4"
          }
        ],
        "contractDependencies": [
          364,
          714,
          1969
        ],
        "contractKind": "contract",
        "documentation": " A periodic contract. Enables any contract to change state on a periodic basis*",
        "fullyImplemented": true,
        "id": 491,
        "linearizedBaseContracts": [
          491,
          1969
        ],
        "name": "PeriodicStages",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "id": 375,
            "libraryName": {
              "contractScope": null,
              "id": 373,
              "name": "SafeMath",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 1860,
              "src": "332:8:4",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_SafeMath_$1860",
                "typeString": "library SafeMath"
              }
            },
            "nodeType": "UsingForDirective",
            "src": "326:27:4",
            "typeName": {
              "id": 374,
              "name": "uint256",
              "nodeType": "ElementaryTypeName",
              "src": "345:7:4",
              "typeDescriptions": {
                "typeIdentifier": "t_uint256",
                "typeString": "uint256"
              }
            }
          },
          {
            "constant": false,
            "id": 377,
            "name": "period",
            "nodeType": "VariableDeclaration",
            "scope": 491,
            "src": "396:20:4",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_contract$_Period_$364",
              "typeString": "contract Period"
            },
            "typeName": {
              "contractScope": null,
              "id": 376,
              "name": "Period",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 364,
              "src": "396:6:4",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_Period_$364",
                "typeString": "contract Period"
              }
            },
            "value": null,
            "visibility": "public"
          },
          {
            "constant": false,
            "id": 379,
            "name": "stack",
            "nodeType": "VariableDeclaration",
            "scope": 491,
            "src": "422:18:4",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_contract$_Stack_$714",
              "typeString": "contract Stack"
            },
            "typeName": {
              "contractScope": null,
              "id": 378,
              "name": "Stack",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 714,
              "src": "422:5:4",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_Stack_$714",
                "typeString": "contract Stack"
              }
            },
            "value": null,
            "visibility": "public"
          },
          {
            "body": {
              "id": 398,
              "nodeType": "Block",
              "src": "616:72:4",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 389,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 384,
                      "name": "stack",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 379,
                      "src": "626:5:4",
                      "typeDescriptions": {
                        "typeIdentifier": "t_contract$_Stack_$714",
                        "typeString": "contract Stack"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "id": 387,
                          "name": "_T",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 381,
                          "src": "644:2:4",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        ],
                        "id": 386,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "nodeType": "NewExpression",
                        "src": "634:9:4",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_creation_nonpayable$_t_uint256_$returns$_t_contract$_Stack_$714_$",
                          "typeString": "function (uint256) returns (contract Stack)"
                        },
                        "typeName": {
                          "contractScope": null,
                          "id": 385,
                          "name": "Stack",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 714,
                          "src": "638:5:4",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_Stack_$714",
                            "typeString": "contract Stack"
                          }
                        }
                      },
                      "id": 388,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "634:13:4",
                      "typeDescriptions": {
                        "typeIdentifier": "t_contract$_Stack_$714",
                        "typeString": "contract Stack"
                      }
                    },
                    "src": "626:21:4",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_Stack_$714",
                      "typeString": "contract Stack"
                    }
                  },
                  "id": 390,
                  "nodeType": "ExpressionStatement",
                  "src": "626:21:4"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 396,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 391,
                      "name": "period",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 377,
                      "src": "657:6:4",
                      "typeDescriptions": {
                        "typeIdentifier": "t_contract$_Period_$364",
                        "typeString": "contract Period"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "id": 394,
                          "name": "_T",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 381,
                          "src": "678:2:4",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        ],
                        "id": 393,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "nodeType": "NewExpression",
                        "src": "666:10:4",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_creation_nonpayable$_t_uint256_$returns$_t_contract$_Period_$364_$",
                          "typeString": "function (uint256) returns (contract Period)"
                        },
                        "typeName": {
                          "contractScope": null,
                          "id": 392,
                          "name": "Period",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 364,
                          "src": "670:6:4",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_Period_$364",
                            "typeString": "contract Period"
                          }
                        }
                      },
                      "id": 395,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "666:15:4",
                      "typeDescriptions": {
                        "typeIdentifier": "t_contract$_Period_$364",
                        "typeString": "contract Period"
                      }
                    },
                    "src": "657:24:4",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_Period_$364",
                      "typeString": "contract Period"
                    }
                  },
                  "id": 397,
                  "nodeType": "ExpressionStatement",
                  "src": "657:24:4"
                }
              ]
            },
            "documentation": "Constructor. Sets up a new period, initializes the offset.\n@param _T Initial number of blocks for the period*",
            "id": 399,
            "implemented": true,
            "isConstructor": true,
            "isDeclaredConst": false,
            "modifiers": [],
            "name": "",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 382,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 381,
                  "name": "_T",
                  "nodeType": "VariableDeclaration",
                  "scope": 399,
                  "src": "597:10:4",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 380,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "597:7:4",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "596:12:4"
            },
            "payable": false,
            "returnParameters": {
              "id": 383,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "616:0:4"
            },
            "scope": 491,
            "src": "585:103:4",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "public"
          },
          {
            "body": {
              "id": 423,
              "nodeType": "Block",
              "src": "738:106:4",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "id": 409,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 405,
                            "name": "msg",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1984,
                            "src": "756:3:4",
                            "typeDescriptions": {
                              "typeIdentifier": "t_magic_message",
                              "typeString": "msg"
                            }
                          },
                          "id": 406,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "sender",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": null,
                          "src": "756:10:4",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "==",
                        "rightExpression": {
                          "argumentTypes": null,
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "id": 407,
                            "name": "owner",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1894,
                            "src": "770:5:4",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$",
                              "typeString": "function () view returns (address)"
                            }
                          },
                          "id": 408,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "770:7:4",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "src": "756:21:4",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      ],
                      "id": 404,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        1987,
                        1988
                      ],
                      "referencedDeclaration": 1987,
                      "src": "748:7:4",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
                        "typeString": "function (bool) pure"
                      }
                    },
                    "id": 410,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "748:30:4",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 411,
                  "nodeType": "ExpressionStatement",
                  "src": "748:30:4"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [],
                    "expression": {
                      "argumentTypes": [],
                      "expression": {
                        "argumentTypes": null,
                        "id": 412,
                        "name": "stack",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 379,
                        "src": "788:5:4",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_Stack_$714",
                          "typeString": "contract Stack"
                        }
                      },
                      "id": 414,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "empty",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 676,
                      "src": "788:11:4",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_external_nonpayable$__$returns$__$",
                        "typeString": "function () external"
                      }
                    },
                    "id": 415,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "788:13:4",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 416,
                  "nodeType": "ExpressionStatement",
                  "src": "788:13:4"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 420,
                        "name": "_T",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 401,
                        "src": "834:2:4",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "expression": {
                        "argumentTypes": null,
                        "id": 417,
                        "name": "period",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 377,
                        "src": "811:6:4",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_Period_$364",
                          "typeString": "contract Period"
                        }
                      },
                      "id": 419,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "setPeriodLength",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 194,
                      "src": "811:22:4",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$",
                        "typeString": "function (uint256) external"
                      }
                    },
                    "id": 421,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "811:26:4",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 422,
                  "nodeType": "ExpressionStatement",
                  "src": "811:26:4"
                }
              ]
            },
            "documentation": null,
            "id": 424,
            "implemented": true,
            "isConstructor": false,
            "isDeclaredConst": false,
            "modifiers": [],
            "name": "setPeriodLength",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 402,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 401,
                  "name": "_T",
                  "nodeType": "VariableDeclaration",
                  "scope": 424,
                  "src": "719:10:4",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 400,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "719:7:4",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "718:12:4"
            },
            "payable": false,
            "returnParameters": {
              "id": 403,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "738:0:4"
            },
            "scope": 491,
            "src": "694:150:4",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "public"
          },
          {
            "body": {
              "id": 443,
              "nodeType": "Block",
              "src": "895:78:4",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "id": 434,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 430,
                            "name": "msg",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1984,
                            "src": "913:3:4",
                            "typeDescriptions": {
                              "typeIdentifier": "t_magic_message",
                              "typeString": "msg"
                            }
                          },
                          "id": 431,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "sender",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": null,
                          "src": "913:10:4",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "==",
                        "rightExpression": {
                          "argumentTypes": null,
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "id": 432,
                            "name": "owner",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1894,
                            "src": "927:5:4",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$",
                              "typeString": "function () view returns (address)"
                            }
                          },
                          "id": 433,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "927:7:4",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "src": "913:21:4",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      ],
                      "id": 429,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        1987,
                        1988
                      ],
                      "referencedDeclaration": 1987,
                      "src": "905:7:4",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
                        "typeString": "function (bool) pure"
                      }
                    },
                    "id": 435,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "905:30:4",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 436,
                  "nodeType": "ExpressionStatement",
                  "src": "905:30:4"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 440,
                        "name": "_duration",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 426,
                        "src": "956:9:4",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "expression": {
                        "argumentTypes": null,
                        "id": 437,
                        "name": "stack",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 379,
                        "src": "945:5:4",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_Stack_$714",
                          "typeString": "contract Stack"
                        }
                      },
                      "id": 439,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "push",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 573,
                      "src": "945:10:4",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$",
                        "typeString": "function (uint256) external"
                      }
                    },
                    "id": 441,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "945:21:4",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 442,
                  "nodeType": "ExpressionStatement",
                  "src": "945:21:4"
                }
              ]
            },
            "documentation": null,
            "id": 444,
            "implemented": true,
            "isConstructor": false,
            "isDeclaredConst": false,
            "modifiers": [],
            "name": "pushStage",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 427,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 426,
                  "name": "_duration",
                  "nodeType": "VariableDeclaration",
                  "scope": 444,
                  "src": "869:17:4",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 425,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "869:7:4",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "868:19:4"
            },
            "payable": false,
            "returnParameters": {
              "id": 428,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "895:0:4"
            },
            "scope": 491,
            "src": "850:123:4",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "public"
          },
          {
            "body": {
              "id": 489,
              "nodeType": "Block",
              "src": "1232:315:4",
              "statements": [
                {
                  "assignments": [
                    450
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 450,
                      "name": "internalBlock",
                      "nodeType": "VariableDeclaration",
                      "scope": 490,
                      "src": "1242:21:4",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 449,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "1242:7:4",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 454,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [],
                    "expression": {
                      "argumentTypes": [],
                      "expression": {
                        "argumentTypes": null,
                        "id": 451,
                        "name": "period",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 377,
                        "src": "1266:6:4",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_Period_$364",
                          "typeString": "contract Period"
                        }
                      },
                      "id": 452,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "getRelativeIndex",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 352,
                      "src": "1266:23:4",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$",
                        "typeString": "function () view external returns (uint256)"
                      }
                    },
                    "id": 453,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1266:25:4",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "1242:49:4"
                },
                {
                  "assignments": [
                    456
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 456,
                      "name": "size",
                      "nodeType": "VariableDeclaration",
                      "scope": 490,
                      "src": "1301:12:4",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 455,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "1301:7:4",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 460,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [],
                    "expression": {
                      "argumentTypes": [],
                      "expression": {
                        "argumentTypes": null,
                        "id": 457,
                        "name": "stack",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 379,
                        "src": "1316:5:4",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_Stack_$714",
                          "typeString": "contract Stack"
                        }
                      },
                      "id": 458,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "height",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 528,
                      "src": "1316:12:4",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$",
                        "typeString": "function () view external returns (uint256)"
                      }
                    },
                    "id": 459,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1316:14:4",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "1301:29:4"
                },
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 463,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 461,
                      "name": "size",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 456,
                      "src": "1343:4:4",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "==",
                    "rightExpression": {
                      "argumentTypes": null,
                      "hexValue": "30",
                      "id": 462,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "1351:1:4",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_0_by_1",
                        "typeString": "int_const 0"
                      },
                      "value": "0"
                    },
                    "src": "1343:9:4",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 467,
                  "nodeType": "IfStatement",
                  "src": "1340:47:4",
                  "trueBody": {
                    "id": 466,
                    "nodeType": "Block",
                    "src": "1354:33:4",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "hexValue": "30",
                          "id": 464,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "number",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "1375:1:4",
                          "subdenomination": null,
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_0_by_1",
                            "typeString": "int_const 0"
                          },
                          "value": "0"
                        },
                        "functionReturnParameters": 448,
                        "id": 465,
                        "nodeType": "Return",
                        "src": "1368:8:4"
                      }
                    ]
                  }
                },
                {
                  "body": {
                    "id": 487,
                    "nodeType": "Block",
                    "src": "1429:112:4",
                    "statements": [
                      {
                        "condition": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "id": 480,
                              "name": "i",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 469,
                              "src": "1470:1:4",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "id": 481,
                              "name": "internalBlock",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 450,
                              "src": "1473:13:4",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "argumentTypes": null,
                              "id": 478,
                              "name": "stack",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 379,
                              "src": "1447:5:4",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_Stack_$714",
                                "typeString": "contract Stack"
                              }
                            },
                            "id": 479,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "positionIsOnSlot",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 713,
                            "src": "1447:22:4",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_external_view$_t_uint256_$_t_uint256_$returns$_t_bool_$",
                              "typeString": "function (uint256,uint256) view external returns (bool)"
                            }
                          },
                          "id": 482,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1447:40:4",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "falseBody": null,
                        "id": 486,
                        "nodeType": "IfStatement",
                        "src": "1443:87:4",
                        "trueBody": {
                          "id": 485,
                          "nodeType": "Block",
                          "src": "1489:41:4",
                          "statements": [
                            {
                              "expression": {
                                "argumentTypes": null,
                                "id": 483,
                                "name": "i",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 469,
                                "src": "1514:1:4",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "functionReturnParameters": 448,
                              "id": 484,
                              "nodeType": "Return",
                              "src": "1507:8:4"
                            }
                          ]
                        }
                      }
                    ]
                  },
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 474,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 472,
                      "name": "i",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 469,
                      "src": "1414:1:4",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "<",
                    "rightExpression": {
                      "argumentTypes": null,
                      "id": 473,
                      "name": "size",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 456,
                      "src": "1418:4:4",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "1414:8:4",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 488,
                  "initializationExpression": {
                    "assignments": [
                      469
                    ],
                    "declarations": [
                      {
                        "constant": false,
                        "id": 469,
                        "name": "i",
                        "nodeType": "VariableDeclaration",
                        "scope": 490,
                        "src": "1401:6:4",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 468,
                          "name": "uint",
                          "nodeType": "ElementaryTypeName",
                          "src": "1401:4:4",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "value": null,
                        "visibility": "internal"
                      }
                    ],
                    "id": 471,
                    "initialValue": {
                      "argumentTypes": null,
                      "hexValue": "30",
                      "id": 470,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "1410:1:4",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_0_by_1",
                        "typeString": "int_const 0"
                      },
                      "value": "0"
                    },
                    "nodeType": "VariableDeclarationStatement",
                    "src": "1401:10:4"
                  },
                  "loopExpression": {
                    "expression": {
                      "argumentTypes": null,
                      "id": 476,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "nodeType": "UnaryOperation",
                      "operator": "++",
                      "prefix": false,
                      "src": "1424:3:4",
                      "subExpression": {
                        "argumentTypes": null,
                        "id": 475,
                        "name": "i",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 469,
                        "src": "1424:1:4",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "id": 477,
                    "nodeType": "ExpressionStatement",
                    "src": "1424:3:4"
                  },
                  "nodeType": "ForStatement",
                  "src": "1396:145:4"
                }
              ]
            },
            "documentation": "Getter for the current Stage inside a period where we are, given the current block\n@return Current stage inside a period, using the internal Index of the given period",
            "id": 490,
            "implemented": true,
            "isConstructor": false,
            "isDeclaredConst": true,
            "modifiers": [],
            "name": "currentStage",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 445,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "1199:2:4"
            },
            "payable": false,
            "returnParameters": {
              "id": 448,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 447,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 490,
                  "src": "1223:7:4",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 446,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1223:7:4",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1222:9:4"
            },
            "scope": 491,
            "src": "1178:369:4",
            "stateMutability": "view",
            "superFunction": null,
            "visibility": "public"
          }
        ],
        "scope": 492,
        "src": "285:1265:4"
      }
    ],
    "src": "0:1551:4"
  },
  "compiler": {
    "name": "solc",
    "version": "0.4.24+commit.e67f0147.Emscripten.clang"
  },
  "networks": {},
  "schemaVersion": "2.0.0",
  "updatedAt": "2018-11-22T12:03:13.685Z"
}