- Refer to the
KillSwitch
contract: https://github.com/starknet-edu/kill-switch/blob/master/src/lib.cairo - Modify this
KillSwitch
contract by adding the following to the trait:
fn activate(self: @TContractState); // this turns the is_active variable to true
fn deactivate(self: @TContractState); // this turns the is_active variable to false
- Add the implementation of the above trait
- Import the
KillSwitch
contract interface intoAggregatorContract
- Modify the
increase_aggr_count_by_two
function in theAggregatorContract
to only successfully update theaggr_count
only when theis_active
state variable ofKillSwitch
contract is true - Deploy
KillSwitch
contract - Redeploy
Aggregator
contract - Test out the logic of
5
above and provide a valid txn hash as proof that this logic works - Create a
session-6-solution.md
file with summary of your workings including the txn hash of8
above - Create a PR against
starknet-contract
branch