- Refer to the
KillSwitchcontract: https://github.com/starknet-edu/kill-switch/blob/master/src/lib.cairo - Modify this
KillSwitchcontract 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
KillSwitchcontract interface intoAggregatorContract - Modify the
increase_aggr_count_by_twofunction in theAggregatorContractto only successfully update theaggr_countonly when theis_activestate variable ofKillSwitchcontract is true - Deploy
KillSwitchcontract - Redeploy
Aggregatorcontract - Test out the logic of
5above and provide a valid txn hash as proof that this logic works - Create a
session-6-solution.mdfile with summary of your workings including the txn hash of8above - Create a PR against
starknet-contractbranch