diff --git a/contracts/src/TLC.1.sol b/contracts/src/TLC.1.sol index a99f0a40..bf5af110 100644 --- a/contracts/src/TLC.1.sol +++ b/contracts/src/TLC.1.sol @@ -10,7 +10,7 @@ import "./interfaces/ITLC.1.sol"; /// @notice Upon deployment, all minted tokens are send to account provided at construction, in charge of creating the vesting schedules /// @notice The contract is based on ERC20Votes by OpenZeppelin. Users need to delegate their voting power to someone or themselves to be able to vote. /// @notice The contract contains vesting logics allowing vested users to still be able to delegate their voting power while their tokens are held in an escrow -contract TLCV1 is ERC20VestableVotesUpgradeableV1, ITLCV1 { +contract TLCV1 is ITLCV1, ERC20VestableVotesUpgradeableV1 { // Token information string internal constant NAME = "Liquid Collective"; string internal constant SYMBOL = "TLC"; diff --git a/contracts/src/components/ERC20VestableVotesUpgradeable.1.sol b/contracts/src/components/ERC20VestableVotesUpgradeable.1.sol index 13ffb1e8..02eb86b5 100644 --- a/contracts/src/components/ERC20VestableVotesUpgradeable.1.sol +++ b/contracts/src/components/ERC20VestableVotesUpgradeable.1.sol @@ -69,8 +69,8 @@ import "../libraries/LibUint256.sol"; /// @notice On Jan 1st 2024, lock period is over and Joe can release all tokens. abstract contract ERC20VestableVotesUpgradeableV1 is Initializable, - IERC20VestableVotesUpgradeableV1, - ERC20VotesUpgradeable + ERC20VotesUpgradeable, + IERC20VestableVotesUpgradeableV1 { // internal used to compute the address of the escrow bytes32 internal constant ESCROW = bytes32(uint256(keccak256("escrow")) - 1); diff --git a/contracts/src/interfaces/ITLC.1.sol b/contracts/src/interfaces/ITLC.1.sol index 72aa7022..7c152dc5 100644 --- a/contracts/src/interfaces/ITLC.1.sol +++ b/contracts/src/interfaces/ITLC.1.sol @@ -9,7 +9,7 @@ import "./components/IERC20VestableVotesUpgradeable.1.sol"; /// @title TLC Interface (v1) /// @author Alluvial /// @notice TLC token interface -interface ITLCV1 is IERC20VestableVotesUpgradeableV1, IVotesUpgradeable, IERC20Upgradeable { +interface ITLCV1 is IERC20Upgradeable, IVotesUpgradeable, IERC20VestableVotesUpgradeableV1 { /// @notice Initializes the TLC Token /// @param _account The initial account to grant all the minted tokens function initTLCV1(address _account) external; diff --git a/contracts/test/TUPProxy.t.sol b/contracts/test/TUPProxy.t.sol index fdfdafac..222e5318 100644 --- a/contracts/test/TUPProxy.t.sol +++ b/contracts/test/TUPProxy.t.sol @@ -6,6 +6,8 @@ import "./utils/LibRlp.sol"; import "../src/TUPProxy.sol"; import "../src/Firewall.sol"; +import {ITransparentUpgradeableProxy} from + "openzeppelin-contracts/contracts/proxy/transparent/TransparentUpgradeableProxy.sol"; contract DummyCounter { error BigError(uint256); @@ -95,7 +97,9 @@ contract TUPProxyTest is Test { function testUpgradeToAndCall() public { assert(DummyCounter(address(proxy)).i() == 0); vm.startPrank(admin); - proxy.upgradeToAndCall(address(implemEvolved), abi.encodeWithSignature("initEvolved(uint256)", 5)); + ITransparentUpgradeableProxy(address(proxy)).upgradeToAndCall( + address(implemEvolved), abi.encodeWithSignature("initEvolved(uint256)", 5) + ); vm.stopPrank(); assert(DummyCounterEvolved(address(proxy)).i() == 5); DummyCounterEvolved(address(proxy)).superInc(); @@ -208,7 +212,7 @@ contract TUPProxyBehindFirewallTest is Test { function testUpgradeToAndCallFromGovernor() public { assert(DummyCounter(address(proxy)).i() == 0); vm.prank(governor); - TUPProxy(payable(address(firewall))).upgradeToAndCall( + ITransparentUpgradeableProxy(payable(address(firewall))).upgradeToAndCall( address(implemEvolved), abi.encodeWithSignature("initEvolved(uint256)", 5) ); assert(DummyCounterEvolved(address(proxy)).i() == 5); @@ -221,7 +225,7 @@ contract TUPProxyBehindFirewallTest is Test { assert(DummyCounter(address(proxy)).i() == 0); vm.prank(executor); vm.expectRevert(abi.encodeWithSignature("Unauthorized(address)", executor)); - TUPProxy(payable(address(firewall))).upgradeToAndCall( + ITransparentUpgradeableProxy(payable(address(firewall))).upgradeToAndCall( address(implemEvolved), abi.encodeWithSignature("initEvolved(uint256)", 5) ); } diff --git a/contracts/test/fork/mainnet/1.vestingSchedulesMigrationV1toV2.t.sol b/contracts/test/fork/mainnet/1.vestingSchedulesMigrationV1toV2.t.sol index e7ccaee6..3fc54dad 100644 --- a/contracts/test/fork/mainnet/1.vestingSchedulesMigrationV1toV2.t.sol +++ b/contracts/test/fork/mainnet/1.vestingSchedulesMigrationV1toV2.t.sol @@ -7,6 +7,8 @@ import "forge-std/Test.sol"; import "../../../src/TUPProxy.sol"; import "../../../src/TLC.1.sol"; import "../../../src/state/tlc/VestingSchedules.2.sol"; +import {ITransparentUpgradeableProxy} from + "openzeppelin-contracts/contracts/proxy/transparent/TransparentUpgradeableProxy.sol"; contract VestingSchedulesMigrationV1ToV2 is Test { bool internal _skip = false; @@ -35,7 +37,7 @@ contract VestingSchedulesMigrationV1ToV2 is Test { TLCV1 newImplementation = new TLCV1(); vm.prank(TLC_MAINNET_PROXY_ADMIN_ADDRESS); - tlcProxy.upgradeToAndCall( + ITransparentUpgradeableProxy(address(tlcProxy)).upgradeToAndCall( address(newImplementation), abi.encodeWithSelector(TLCV1.migrateVestingSchedules.selector) ); diff --git a/contracts/test/fork/mainnet/2.operatorsMigrationV1toV2.t.sol b/contracts/test/fork/mainnet/2.operatorsMigrationV1toV2.t.sol index e8c230ad..d0840c33 100644 --- a/contracts/test/fork/mainnet/2.operatorsMigrationV1toV2.t.sol +++ b/contracts/test/fork/mainnet/2.operatorsMigrationV1toV2.t.sol @@ -6,6 +6,8 @@ import "forge-std/Test.sol"; import "../../../src/TUPProxy.sol"; import "../../../src/OperatorsRegistry.1.sol"; +import {ITransparentUpgradeableProxy} from + "openzeppelin-contracts/contracts/proxy/transparent/TransparentUpgradeableProxy.sol"; contract OperatorsMigrationV1ToV2 is Test { bool internal _skip = false; @@ -35,7 +37,7 @@ contract OperatorsMigrationV1ToV2 is Test { OperatorsRegistryV1 newImplementation = new OperatorsRegistryV1(); vm.prank(OPERATORS_REGISTRY_MAINNET_PROXY_ADMIN_ADDRESS); - orProxy.upgradeToAndCall( + ITransparentUpgradeableProxy(address(orProxy)).upgradeToAndCall( address(newImplementation), abi.encodeWithSelector(OperatorsRegistryV1.initOperatorsRegistryV1_1.selector) ); diff --git a/contracts/test/fork/mainnet/3.operatorsFundedEventEmission.t.sol b/contracts/test/fork/mainnet/3.operatorsFundedEventEmission.t.sol index b34a2443..0a4857a3 100644 --- a/contracts/test/fork/mainnet/3.operatorsFundedEventEmission.t.sol +++ b/contracts/test/fork/mainnet/3.operatorsFundedEventEmission.t.sol @@ -6,6 +6,8 @@ import "forge-std/Test.sol"; import "../../../src/TUPProxy.sol"; import "../../../src/OperatorsRegistry.1.sol"; +import {ITransparentUpgradeableProxy} from + "openzeppelin-contracts/contracts/proxy/transparent/TransparentUpgradeableProxy.sol"; contract OperatorsEventsMigrationV1ToV2 is Test { bool internal _skip = false; @@ -37,7 +39,7 @@ contract OperatorsEventsMigrationV1ToV2 is Test { OperatorsRegistryV1 newImplementation = new OperatorsRegistryV1(); vm.prank(OPERATORS_REGISTRY_MAINNET_PROXY_ADMIN_ADDRESS); - orProxy.upgradeToAndCall( + ITransparentUpgradeableProxy(address(orProxy)).upgradeToAndCall( address(newImplementation), abi.encodeWithSelector(OperatorsRegistryV1.initOperatorsRegistryV1_1.selector) ); @@ -93,7 +95,7 @@ contract OperatorsEventsMigrationV1ToV2 is Test { OperatorsRegistryV1 newImplementation = new OperatorsRegistryV1(); vm.prank(OPERATORS_REGISTRY_MAINNET_PROXY_ADMIN_ADDRESS); - orProxy.upgradeToAndCall( + ITransparentUpgradeableProxy(address(orProxy)).upgradeToAndCall( address(newImplementation), abi.encodeWithSelector(OperatorsRegistryV1.initOperatorsRegistryV1_1.selector) ); diff --git a/lib/openzeppelin-contracts b/lib/openzeppelin-contracts index ecd2ca2c..fd81a96f 160000 --- a/lib/openzeppelin-contracts +++ b/lib/openzeppelin-contracts @@ -1 +1 @@ -Subproject commit ecd2ca2cd7cac116f7a37d0e474bbb3d7d5e1c4d +Subproject commit fd81a96f01cc42ef1c9a5399364968d0e07e9e90 diff --git a/lib/openzeppelin-contracts-upgradeable b/lib/openzeppelin-contracts-upgradeable index ac5931e2..3d4c0d57 160000 --- a/lib/openzeppelin-contracts-upgradeable +++ b/lib/openzeppelin-contracts-upgradeable @@ -1 +1 @@ -Subproject commit ac5931e2afbff4a66faede4c830998ee56a301c9 +Subproject commit 3d4c0d5741b131c231e558d7a6213392ab3672a5