Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add freeze all assets spell, integration for all assets (SC-243) #3

Merged
merged 49 commits into from
Nov 23, 2023
Merged
Show file tree
Hide file tree
Changes from 48 commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
925973e
feat: add outline for sparklend pauser
lucas-manuel Nov 2, 2023
5e833db
fix: rm certora files
lucas-manuel Nov 2, 2023
b989973
feat: add test coverage for wards ACL functions
lucas-manuel Nov 2, 2023
8afcb35
feat: add pool mock, use freeze instead of pause
lucas-manuel Nov 3, 2023
5d54d71
feat: add test coverage for freeze
lucas-manuel Nov 3, 2023
9b0c0d3
feat: get to 100% unit test coverage
lucas-manuel Nov 3, 2023
70516b1
fix: rm counter.s.sol
lucas-manuel Nov 3, 2023
0c14977
fix: add pragma and remove unused interface
lucas-manuel Nov 3, 2023
c8109d1
fix: add double underscore
lucas-manuel Nov 3, 2023
327fba7
feat: add reserve freezes, update test structure
lucas-manuel Nov 6, 2023
566cb45
feat: add freeze and freeze all coverage
lucas-manuel Nov 6, 2023
36cab19
feat: set up test
lucas-manuel Nov 8, 2023
8914054
forge install: erc20-helpers
lucas-manuel Nov 8, 2023
6c0058d
feat: get initial freeze tests working
lucas-manuel Nov 8, 2023
ed4df8a
forge install: aave-v3-core
lucas-manuel Nov 8, 2023
3a0950a
feat: all tests passing
lucas-manuel Nov 8, 2023
0894430
chore: improve test comments
lucas-manuel Nov 8, 2023
9086ad4
fix: update README
lucas-manuel Nov 9, 2023
faec6fe
fix: update to standard structure
lucas-manuel Nov 9, 2023
3e081b8
fix: update changes from rebase
lucas-manuel Nov 9, 2023
9d74877
feat: get to full natspec
lucas-manuel Nov 9, 2023
58dc680
feat: add natspec and overrides
lucas-manuel Nov 9, 2023
24278f2
Merge branch 'sc-204-build-gsm-bypass' into sc-239-add-spells-and-tests
lucas-manuel Nov 9, 2023
c4f64bf
feat: get to full coverage
lucas-manuel Nov 9, 2023
21af6aa
fix: rm authority from constructor
lucas-manuel Nov 10, 2023
b8e6669
fix: update comments
lucas-manuel Nov 10, 2023
c64a86b
fix: update to use specified caller, uniform tests
lucas-manuel Nov 10, 2023
3bdc955
feat: update to add freeze market events, events testing
lucas-manuel Nov 10, 2023
21e0704
fix: alignment
lucas-manuel Nov 10, 2023
5354fd5
feat: merge branch and fix conflicts
lucas-manuel Nov 10, 2023
c741113
fix: update as per review
lucas-manuel Nov 12, 2023
8d2b021
Merge branch 'sc-204-build-gsm-bypass' into sc-239-add-spells-and-tests
lucas-manuel Nov 12, 2023
4e3d025
fix: update to use constuctor param, update tests
lucas-manuel Nov 13, 2023
24d642b
fix: update comments
lucas-manuel Nov 13, 2023
43ebac1
fix: use immutable
lucas-manuel Nov 13, 2023
c11c530
fix: update natspec
lucas-manuel Nov 13, 2023
e43763e
Merge branch 'sc-204-build-gsm-bypass' into sc-239-add-spells-and-tests
lucas-manuel Nov 13, 2023
55594cc
fix: update naming
lucas-manuel Nov 13, 2023
858a26c
chore: merge master
lucas-manuel Nov 14, 2023
88c5ea3
feat: add freeze all spell
lucas-manuel Nov 14, 2023
9c1d8f0
feat: test all assets
lucas-manuel Nov 14, 2023
6ece12a
feat: refactor tests to use internal functions
lucas-manuel Nov 14, 2023
d4f4c54
feat: add failure tests for all asset spell
lucas-manuel Nov 14, 2023
363a32a
feat: all tests passing
lucas-manuel Nov 14, 2023
4fc73af
fix: cleanup
lucas-manuel Nov 14, 2023
dc63182
chore: merge master
lucas-manuel Nov 17, 2023
7462465
feat: update to use zero supply caps and updated protocol state
lucas-manuel Nov 21, 2023
856308c
feat: update to add executed boolean
lucas-manuel Nov 21, 2023
7c1c1df
fix: update to use cei
lucas-manuel Nov 23, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions src/spells/EmergencySpell_SparkLend_FreezeAllAssets.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// SPDX-License-Identifier: AGPL-3.0-or-later
pragma solidity ^0.8.13;

import { ISparkLendFreezerMom } from "src/interfaces/ISparkLendFreezerMom.sol";

contract EmergencySpell_SparkLend_FreezeAllAssets {

address public immutable sparkLendFreezerMom;

bool public executed;

constructor(address sparklendFreezerMom_) {
sparkLendFreezerMom = sparklendFreezerMom_;
}

function freeze() external {
require(!executed, "FreezeAllAssetsSpell/already-executed");
ISparkLendFreezerMom(sparkLendFreezerMom).freezeAllMarkets();
executed = true;
hexonaut marked this conversation as resolved.
Show resolved Hide resolved
}

}
4 changes: 4 additions & 0 deletions src/spells/EmergencySpell_SparkLend_FreezeSingleAsset.sol
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,17 @@ contract EmergencySpell_SparkLend_FreezeSingleAsset {
address public immutable sparkLendFreezerMom;
address public immutable reserve;

bool public executed;

constructor(address sparklendFreezerMom_, address reserve_) {
sparkLendFreezerMom = sparklendFreezerMom_;
reserve = reserve_;
}

function freeze() external {
require(!executed, "FreezeSingleAssetSpell/already-executed");
ISparkLendFreezerMom(sparkLendFreezerMom).freezeMarket(reserve);
executed = true;
hexonaut marked this conversation as resolved.
Show resolved Hide resolved
}

}
Loading
Loading