Skip to content
This repository was archived by the owner on Oct 8, 2024. It is now read-only.

Instant actions #96

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open

Instant actions #96

wants to merge 10 commits into from

Conversation

brianmcmichael
Copy link
Contributor

  • Adds an optional instantActions() function to DssExec.
    • instantActions() is called in schedule() and enables the use of IAM calls in a DssExec spell.
  • Adds a disable(address) function to DssExecLib.
    • This pattern is found in the d3m direct mom and is useful to have for testing and future IAM calls.
  • Refactors some tests
  • Updates README with new function

// to be performed via an instant access module. This function is called
// during the `schedule()` call, once the spell has achieved the hat.
// These functions will not be limited by the officeHours modifier.
function instantActions() public virtual {}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wondering if would be better to define it without empty implementation so we we make sure to always overwrite it by an empty one in the spell action being deployed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do them so rarely that I didn't want to force it into every spellaction.

@@ -40,6 +40,8 @@ import {DssAutoLine} from "dss-auto-line/DssAutoLine.sol";
import {LerpFactory} from "dss-lerp/LerpFactory.sol";
import {DssDirectDepositAaveDai}
from "dss-direct-deposit/DssDirectDepositAaveDai.sol";
import {AaveMock} from "./fixtures/AaveMock.sol";
import {DirectDepositMom} from "dss-direct-deposit/DirectDepositMom.sol";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

D3M repo won't be able to be imported here anymore as it is using solc 0.8.x. We will need to find another way to test D3M stuff.

@@ -282,6 +286,14 @@ library DssExecLib {
function setAuthority(address _base, address _authority) public {
Authorizable(_base).setAuthority(_authority);
}
/**
@dev Deactivates a module with a disable function
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding other mom-related breaker pattern instant actions (e.g. osm-mom stop, clipper-mom setBreaker, ...).

@naszam
Copy link
Contributor

naszam commented Mar 21, 2023

@brianmcmichael It seems we should resolve merging conflicts before proceeding with another run of reviews.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants