contract DssSpell {
    DSPauseAbstract public pause =
        DSPauseAbstract(0xbE286431454714F511008713973d3B053A2d38f3);
    address         public action;
    bytes32         public tag;
    uint256         public eta;
    bytes           public sig;
    uint256         public expiration;
    bool            public done;

    // Provides a descriptive tag for bot consumption
    // This should be modified weekly to provide a summary of the actions
    // Hash: seth keccak -- "$(wget https://raw.githubusercontent.com/makerdao/community/b95693cd9ac1150669e4477fd1a5faef1c79bf98/governance/votes/Executive%20vote%20-%20September%202%2C%202020.md -q -O - 2>/dev/null)"
    string constant public description =
        "2020-09-02 MakerDAO Executive Spell | Hash: 0xf870017b12e881587834d2de36a5cebe4c53e0d120efcc1fdbb4002bd2f15317";

    constructor() public {
        sig = abi.encodeWithSignature("execute()");
        action = address(new SpellAction());
        bytes32 _tag;
        address _action = action;
        assembly { _tag := extcodehash(_action) }
        tag = _tag;
        expiration = now + 30 days;
    }

    // modifier officeHours {
    //     uint day = (now / 1 days + 3) % 7;
    //     require(day < 5, "Can only be cast on a weekday");
    //     uint hour = now / 1 hours % 24;
    //     require(hour >= 14 && hour < 21, "Outside office hours");
    //     _;
    // }

    function schedule() public {
        require(now <= expiration, "This contract has expired");
        require(eta == 0, "This spell has already been scheduled");
        eta = now + DSPauseAbstract(pause).delay();
        pause.plot(action, tag, sig, eta);
    }

    function cast() public /*officeHours*/ {
        require(!done, "spell-already-cast");
        done = true;
        pause.exec(action, tag, sig, eta);
    }
}
function schedule() public {
    require(now <= expiration, "This contract has expired");
    require(eta == 0, "This spell has already been scheduled");
    eta = now + DSPauseAbstract(pause).delay();
    pause.plot(action, tag, sig, eta);
}

// modifier officeHours {
//     uint day = (now / 1 days + 3) % 7;
//     require(day < 5, "Can only be cast on a weekday");
//     uint hour = now / 1 hours % 24;
//     require(hour >= 14 && hour < 21, "Outside office hours");
//     _;
// }