Skip to content

Commit

Permalink
Updates github workflow and hardhat config, removes "legacy" info fro…
Browse files Browse the repository at this point in the history
…m governance contracts

Co-authored-by: Michalina <[email protected]>
  • Loading branch information
vzotova and michalinacienciala committed Sep 9, 2024
1 parent e4ec5ae commit b20c442
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 24 deletions.
6 changes: 0 additions & 6 deletions .github/workflows/contracts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 2 additions & 4 deletions contracts/governance/StakerGovernorVotes.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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}
Expand Down
11 changes: 2 additions & 9 deletions contracts/governance/TokenholderGovernorVotes.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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}
Expand All @@ -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
Expand Down
5 changes: 0 additions & 5 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
},
},
Expand All @@ -93,10 +92,6 @@ const config: HardhatUserConfig = {
thresholdCouncil: {
mainnet: "0x9F6e831c8F8939DC0C830C6e492e7cEf4f9C2F5f",
},
keepRegistryKeeper: {
default: 1, // same as the deployer
sepolia: "0x68ad60CC5e8f3B7cC53beaB321cf0e6036962dBc",
},
},
mocha: {
timeout: 60000,
Expand Down

0 comments on commit b20c442

Please sign in to comment.