Skip to content

Commit

Permalink
Revert "Script for enabling on chain gauge voting (#691)"
Browse files Browse the repository at this point in the history
This reverts commit 7f1a1b7.
  • Loading branch information
hammeiam committed Sep 13, 2022
1 parent 7f1a1b7 commit e6c3199
Show file tree
Hide file tree
Showing 9 changed files with 44 additions and 148 deletions.
4 changes: 2 additions & 2 deletions deploy/hardhat/999_impersonate_owners.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {

await asyncForEach(holders, async (holder) => {
const balance = await contract.balanceOf(holder)
await setEtherBalance(holder, ethers.constants.WeiPerEther.mul(1000))
await setEtherBalance(holder, 1e20)
await contract
.connect(await impersonateAccount(holder))
.transfer(deployer, await contract.balanceOf(holder))
Expand All @@ -72,7 +72,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
})
}
// Give the deployer some ether to use for testing
await setEtherBalance(deployer, ethers.constants.WeiPerEther.mul(1000))
await setEtherBalance(deployer, 1e20)
} else {
log(`skipping ${path.basename(__filename)}`)
}
Expand Down
2 changes: 1 addition & 1 deletion deploy/mainnet/599_multisig_actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
// We will be impersonating this account to unpause vesdl and do other various tasks relating to ownership of Saddle.
const multisig = MULTISIG_ADDRESSES[CHAIN_ID.MAINNET]
const multisigSigner = await impersonateAccount(multisig)
await setEtherBalance(multisig, ethers.constants.WeiPerEther.mul(10000))
await setEtherBalance(multisig, 1e20)

// Get all necessary contracts
const sdl = (await ethers.getContract(SDL_CONTRACT_NAME)) as SDL
Expand Down
10 changes: 2 additions & 8 deletions deploy/mainnet/999_impersonate_owners.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import dotenv from "dotenv"
import { ethers } from "hardhat"
import { isMainnet } from "../../utils/network"
import path from "path"
import { getHardhatTestSigners } from "../../scripts/utils"

dotenv.config()

Expand Down Expand Up @@ -60,7 +59,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {

await asyncForEach(holders, async (holder) => {
const balance = await contract.balanceOf(holder)
await setEtherBalance(holder, ethers.constants.WeiPerEther.mul(1000))
await setEtherBalance(holder, 1e20)
await contract
.connect(await impersonateAccount(holder))
.transfer(deployer, await contract.balanceOf(holder))
Expand All @@ -73,12 +72,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
})
}
// Give the deployer some ether to use for testing
await setEtherBalance(deployer, ethers.constants.WeiPerEther.mul(1000))
// Give hardhat test account some ether
await setEtherBalance(
await getHardhatTestSigners()[0].getAddress(),
ethers.constants.WeiPerEther.mul(1000),
)
await setEtherBalance(deployer, 1e20)
} else {
log(`skipping ${path.basename(__filename)}`)
}
Expand Down
56 changes: 0 additions & 56 deletions scripts/forked_mainnet/enableOnChainGaugeVoting.ts

This file was deleted.

37 changes: 37 additions & 0 deletions scripts/utils.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
const DEPLOYMENTS_TO_NETWORK = {
arbitrum_mainnet: {
id: 42161,
test: false,
explorerApi: "https://api.arbiscan.io",
apiKeyName: "ARBISCAN_API",
},
evmos_mainnet: { id: 9001, test: false },
evmos_testnet: { id: 9000, test: true },
fantom_mainnet: {
id: 250,
test: false,
explorerApi: "https://api.ftmscan.com",
apiKeyName: "FTMSCAN_API",
},
mainnet: {
id: 1,
test: false,
explorerApi: "https://api.etherscan.io",
apiKeyName: "ETHERSCAN_API",
},
optimism_mainnet: {
id: 10,
test: false,
explorerApi: "https://api-optimistic.etherscan.io",
apiKeyName: "ETHERSCAN_API",
},
ropsten: {
id: 3,
test: true,
explorerApi: "https://api-ropsten.etherscan.io",
apiKeyName: "ETHERSCAN_API",
},
localhost: { id: 31337, test: true },
}

module.exports = { DEPLOYMENTS_TO_NETWORK }
68 changes: 0 additions & 68 deletions scripts/utils.ts

This file was deleted.

4 changes: 2 additions & 2 deletions test/testUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,11 +196,11 @@ export async function impersonateAccount(

export async function setEtherBalance(
address: string,
amount: BigNumber,
amount: number,
): Promise<any> {
return ethers.provider.send("hardhat_setBalance", [
address,
amount.toHexString(),
`0x${amount.toString(16)}`,
])
}

Expand Down
5 changes: 0 additions & 5 deletions utils/network.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
import { ensureEnvVar } from "./utils"
import dotenv from "dotenv"

dotenv.config()

export const CHAIN_ID: Record<string, string> = {
MAINNET: "1",
ROPSTEN: "3",
Expand Down
6 changes: 0 additions & 6 deletions utils/utils.ts

This file was deleted.

0 comments on commit e6c3199

Please sign in to comment.