From 89e742af837d4ac43f07f6ccb007c35658de3a01 Mon Sep 17 00:00:00 2001 From: 0xdavinchee <0xdavinchee@gmail.com> Date: Thu, 21 Sep 2023 16:22:20 +0300 Subject: [PATCH] fix breaking build + address comments --- packages/ethereum-contracts/contracts/mocks/SuperTokenMock.sol | 3 +++ .../test/foundry/superfluid/Superfluid.t.sol | 3 +-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/ethereum-contracts/contracts/mocks/SuperTokenMock.sol b/packages/ethereum-contracts/contracts/mocks/SuperTokenMock.sol index 08837a35a5..092c698862 100644 --- a/packages/ethereum-contracts/contracts/mocks/SuperTokenMock.sol +++ b/packages/ethereum-contracts/contracts/mocks/SuperTokenMock.sol @@ -59,6 +59,9 @@ contract SuperTokenStorageLayoutTester is SuperToken { require (slot == 18 && offset == 0, "_operators changed location"); // uses 4 slots + assembly { slot:= _adminOverride.slot offset := _adminOverride.offset } + require (slot == 22 && offset == 0, "_adminOverride changed location"); + assembly { slot:= _reserve23.slot offset := _reserve23.offset } require (slot == 23 && offset == 0, "_reserve23 changed location"); diff --git a/packages/ethereum-contracts/test/foundry/superfluid/Superfluid.t.sol b/packages/ethereum-contracts/test/foundry/superfluid/Superfluid.t.sol index 3fb479364d..1fbbb090f7 100644 --- a/packages/ethereum-contracts/test/foundry/superfluid/Superfluid.t.sol +++ b/packages/ethereum-contracts/test/foundry/superfluid/Superfluid.t.sol @@ -70,10 +70,9 @@ contract SuperfluidIntegrationTest is FoundrySuperfluidTester { vm.stopPrank(); vm.startPrank(address(sf.governance)); + vm.expectRevert(ISuperToken.SUPER_TOKEN_ONLY_ADMIN.selector); sf.host.changeSuperTokenAdmin(superToken, newAdmin); vm.stopPrank(); - - assertEq(superToken.getAdminOverride().admin, newAdmin, "Superfluid.t: super token admin not changed"); } function testRevertChangeSuperTokenAdminWhenNotGovernanceCalling(address newAdmin) public {