From b20c44233eb74d3c2c291869391d6ef487771a05 Mon Sep 17 00:00:00 2001 From: Victoria Zotova Date: Wed, 29 Nov 2023 12:56:37 -0500 Subject: [PATCH] Updates github workflow and hardhat config, removes "legacy" info from governance contracts Co-authored-by: Michalina --- .github/workflows/contracts.yml | 6 ------ .github/workflows/npm.yml | 3 +++ contracts/governance/StakerGovernorVotes.sol | 6 ++---- contracts/governance/TokenholderGovernorVotes.sol | 11 ++--------- hardhat.config.ts | 5 ----- 5 files changed, 7 insertions(+), 24 deletions(-) diff --git a/.github/workflows/contracts.yml b/.github/workflows/contracts.yml index dcc82c12..3dafdfe8 100644 --- a/.github/workflows/contracts.yml +++ b/.github/workflows/contracts.yml @@ -183,12 +183,6 @@ jobs: - name: Install needed dependencies run: yarn install --frozen-lockfile - # If we don't remove the `keep-core` contracts from `node-modules`, the - # `etherscan-verify` plugins tries to verify them, which is not desired. - - name: Prepare for verification on Etherscan - run: | - rm -rf ./external/npm - - name: Verify contracts on Etherscan env: ETHERSCAN_API_KEY: ${{ secrets.ETHERSCAN_API_KEY }} diff --git a/.github/workflows/npm.yml b/.github/workflows/npm.yml index 8c414694..5f1857b9 100644 --- a/.github/workflows/npm.yml +++ b/.github/workflows/npm.yml @@ -27,6 +27,9 @@ jobs: registry-url: "https://registry.npmjs.org" cache: "yarn" + - name: Install needed dependencies + run: yarn install --frozen-lockfile + # Deploy contracts to a local network to generate deployment artifacts that # are required by dashboard compilation. - name: Deploy contracts diff --git a/contracts/governance/StakerGovernorVotes.sol b/contracts/governance/StakerGovernorVotes.sol index c55c1413..a97228a9 100644 --- a/contracts/governance/StakerGovernorVotes.sol +++ b/contracts/governance/StakerGovernorVotes.sol @@ -19,8 +19,7 @@ import "./GovernorParameters.sol"; import "./IVotesHistory.sol"; /// @title StakerGovernorVotes -/// @notice Staker DAO voting power extraction from staked T positions, -// including legacy stakes (NU/KEEP). +/// @notice Staker DAO voting power extraction from staked T positions. abstract contract StakerGovernorVotes is GovernorParameters { IVotesHistory public immutable staking; @@ -29,8 +28,7 @@ abstract contract StakerGovernorVotes is GovernorParameters { } /// @notice Read the voting weight from the snapshot mechanism in the T - /// staking contracts. Note that this also tracks legacy stakes - /// (NU/KEEP). + /// staking contracts. /// @param account Delegate account with T staking voting power /// @param blockNumber The block number to get the vote balance at /// @dev See {IGovernor-getVotes} diff --git a/contracts/governance/TokenholderGovernorVotes.sol b/contracts/governance/TokenholderGovernorVotes.sol index 69a17ba8..79be03e6 100644 --- a/contracts/governance/TokenholderGovernorVotes.sol +++ b/contracts/governance/TokenholderGovernorVotes.sol @@ -20,7 +20,7 @@ import "./IVotesHistory.sol"; /// @title TokenholderGovernorVotes /// @notice Tokenholder DAO voting power extraction from both liquid and staked -/// T token positions, including legacy stakes (NU/KEEP). +/// T token positions. abstract contract TokenholderGovernorVotes is GovernorParameters { IVotesHistory public immutable token; IVotesHistory public immutable staking; @@ -35,10 +35,6 @@ abstract contract TokenholderGovernorVotes is GovernorParameters { /// two voting power sources: /// - Liquid T, tracked by the T token contract /// - Stakes in the T network, tracked by the T staking contract. - /// Note that this also tracks legacy stakes (NU/KEEP); legacy - /// stakes count for tokenholders' voting power, but not for the - /// total voting power of the Tokenholder DAO - /// (see {_getPastTotalSupply}). /// @param account Tokenholder account in the T network /// @param blockNumber The block number to get the vote balance at /// @dev See {IGovernor-getVotes} @@ -57,10 +53,7 @@ abstract contract TokenholderGovernorVotes is GovernorParameters { /// @notice Compute the total voting power for Tokenholder DAO. Note how it /// only uses the token total supply as source, as native T tokens /// that are staked continue existing, but as deposits in the - /// staking contract. However, legacy stakes can't contribute to the - /// total voting power as they're already implicitly counted as part - /// of Vending Machines' liquid balance; hence, we only need to read - /// total voting power from the token. + /// staking contract. /// @param blockNumber The block number to get the vote power at function _getPastTotalSupply(uint256 blockNumber) internal diff --git a/hardhat.config.ts b/hardhat.config.ts index c27305dc..899cc0a2 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -80,7 +80,6 @@ const config: HardhatUserConfig = { // For hardhat environment we can fork the mainnet, so we need to point it // to the contract artifacts. hardhat: process.env.FORKING_URL ? ["./external/mainnet"] : [], - sepolia: ["./external/sepolia"], mainnet: ["./external/mainnet"], }, }, @@ -93,10 +92,6 @@ const config: HardhatUserConfig = { thresholdCouncil: { mainnet: "0x9F6e831c8F8939DC0C830C6e492e7cEf4f9C2F5f", }, - keepRegistryKeeper: { - default: 1, // same as the deployer - sepolia: "0x68ad60CC5e8f3B7cC53beaB321cf0e6036962dBc", - }, }, mocha: { timeout: 60000,