Skip to content

Revoke Burner Role#270

Merged
Joeysantoro merged 5 commits intofeat/v2/basefrom
feat/Permanently-Revoke-Burner
Nov 3, 2021
Merged

Revoke Burner Role#270
Joeysantoro merged 5 commits intofeat/v2/basefrom
feat/Permanently-Revoke-Burner

Conversation

@Joeysantoro
Copy link
Contributor

@Joeysantoro Joeysantoro commented Oct 25, 2021

Adds a RestrictedPermissions contract which ignores or reverts on checks for burner, governor, and pcv controller.

It passes through checks for minter and guardian to the main core contract.

The intended usage is to setCore() on Fei contract so the burner functionality can no longer be used, nor transfer hooks.

Copy link
Contributor

@xklob xklob left a comment

Choose a reason for hiding this comment

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

See comments; also the tests here are only testing view functions. I'd like to see a few tests with this applied to user flows within the system (so I guess integration tests) before approving.

@ElliotFriedman
Copy link
Contributor

@Joeysantoro Have we run integration tests on this?

Copy link
Contributor

@xklob xklob left a comment

Choose a reason for hiding this comment

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

See comments.

Honestly the way that this revokes the roles breaks some, imo, very important patterns and makes me very wary as is:

  • any contract that might exist that calls fei.getCore() to do some operation via the core will break. even if we don't have any contract that does this (I'm not sure if we don't), there's probably other contracts by external parties that do. one solution to this is to proxy-through all calls that aren't the ones we define in restrictedPermissions, which is not hard to do, and I think probably a much better pattern

  • I really dislike reverting when calling a view/pure function, especially one that should be a getter. "isGovernor" should never revert, just return false if disabled as in this case.

});

describe('Reserve Stabilizer', async () => {
describe.skip('Reserve Stabilizer', async () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this skipped?

@xklob
Copy link
Contributor

xklob commented Oct 29, 2021

also should fix e2e tests or skip them if irrelevant

xklob
xklob previously requested changes Nov 2, 2021
await resetFork();
});

describe.only('e2e-fei', function () {
Copy link
Contributor

Choose a reason for hiding this comment

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

remove .only

@xklob
Copy link
Contributor

xklob commented Nov 2, 2021

Looks good to me - just fix that .only and should be fine. The failing e2e tests are annoying so if you could fix them too that'd be great, but they aren't relevant to this PR.

@Joeysantoro Joeysantoro changed the base branch from develop to feat/v2/base November 2, 2021 05:21
@Joeysantoro Joeysantoro merged commit 33f8183 into feat/v2/base Nov 3, 2021
@Joeysantoro Joeysantoro deleted the feat/Permanently-Revoke-Burner branch November 3, 2021 01:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments