Skip to content

Commit

Permalink
chore(staking): move managed to main contract
Browse files Browse the repository at this point in the history
Signed-off-by: Tomás Migone <[email protected]>
  • Loading branch information
tmigone committed May 21, 2024
1 parent fd8ad11 commit 5e12031
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/horizon/contracts/staking/HorizonStaking.sol
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { HorizonStakingV1Storage } from "./HorizonStakingStorage.sol";
* It uses a HorizonStakingExtension contract to implement the full IHorizonStaking interface through delegatecalls.
* This is due to the contract size limit on Arbitrum (24kB like mainnet).
*/
contract HorizonStaking is GraphUpgradeable, Multicall, HorizonStakingV1Storage, IHorizonStakingBase {
contract HorizonStaking is GraphUpgradeable, Multicall, Managed, HorizonStakingV1Storage, IHorizonStakingBase {
/// @dev 100% in parts per million
uint32 internal constant MAX_PPM = 1000000;

Expand Down
4 changes: 1 addition & 3 deletions packages/horizon/contracts/staking/HorizonStakingStorage.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ pragma solidity 0.8.24;
import { IStakingBackwardsCompatibility } from "../interfaces/IStakingBackwardsCompatibility.sol";
import { IHorizonStakingTypes } from "../interfaces/IHorizonStakingTypes.sol";

import { Managed } from "./utilities/Managed.sol";

// TODO: create custom var-name-mixedcase
/* solhint-disable var-name-mixedcase */

Expand All @@ -15,7 +13,7 @@ import { Managed } from "./utilities/Managed.sol";
* @notice This contract holds all the storage variables for the Staking contract, version 1
*/
// solhint-disable-next-line max-states-count
abstract contract HorizonStakingV1Storage is Managed {
abstract contract HorizonStakingV1Storage {
// -- Staking --

/// @dev Minimum amount of tokens an indexer needs to stake.
Expand Down
2 changes: 2 additions & 0 deletions packages/horizon/hardhat.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// import '@nomicfoundation/hardhat-foundry'
import '@nomicfoundation/hardhat-toolbox'
import 'hardhat-storage-layout'

import { HardhatUserConfig } from 'hardhat/config'

const config: HardhatUserConfig = {
Expand Down
1 change: 1 addition & 0 deletions packages/horizon/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"ethers": "^6.4.0",
"hardhat": "^2.20.1",
"hardhat-gas-reporter": "^1.0.8",
"hardhat-storage-layout": "^0.1.7",
"lint-staged": "^15.2.2",
"prettier": "^3.2.5",
"prettier-plugin-solidity": "^1.3.1",
Expand Down
1 change: 1 addition & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2932,6 +2932,7 @@ __metadata:
ethers: "npm:^6.4.0"
hardhat: "npm:^2.20.1"
hardhat-gas-reporter: "npm:^1.0.8"
hardhat-storage-layout: "npm:^0.1.7"
lint-staged: "npm:^15.2.2"
prettier: "npm:^3.2.5"
prettier-plugin-solidity: "npm:^1.3.1"
Expand Down

0 comments on commit 5e12031

Please sign in to comment.