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

test: l2 adapter permissioned flows #48

Merged
merged 8 commits into from
Jun 18, 2024

Conversation

hexshire
Copy link
Member

🤖 Linear

Closes OPT-104

Copy link

linear bot commented Jun 18, 2024

OPT-104 Permissioned Flows

Only flows that start on L2

For example but not limited to:

  • USDC Implementation upgrades
  • Upgrading arbitrary USDC permissions

*/
function test_UpgradeTo() public {
// Setup necessary data
vm.etch(_newImplementation, 'Legit code');
Copy link
Contributor

Choose a reason for hiding this comment

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

lets avoid using cheatcodes besides neccessary ones like deal and prank, I would prefer to just deploy the dummy contract in integration

bytes memory _calldata =
abi.encodeWithSignature('upgradeToAndCall(address,bytes)', _newImplementation, _functionToCall);

vm.startPrank(_notOwner);
Copy link
Contributor

Choose a reason for hiding this comment

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

imo we dont need to add the revert checks in every call, its already tested in unit and makes it harder to read the actual scenario we want to test. If we keep it can you make it its own scenario

@hexshire hexshire requested a review from excaliborr June 18, 2024 12:29
Copy link
Contributor

@0xDiscotech 0xDiscotech left a comment

Choose a reason for hiding this comment

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

The tests looks amazing. Well done ser 👏

@excaliborr excaliborr merged commit 09de89c into dev Jun 18, 2024
4 checks passed
@excaliborr excaliborr deleted the test/l2-adapter-permissionerd-flows branch June 18, 2024 14:48
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