Skip to content

Commit

Permalink
chore: clean up code on ec
Browse files Browse the repository at this point in the history
  • Loading branch information
doncesarts committed Aug 16, 2022
1 parent d72fbaf commit 7dd1f72
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 16 deletions.
1 change: 0 additions & 1 deletion tasks/deployEmissionsController.ts
Expand Up @@ -46,7 +46,6 @@ task("deploy-emissions")
.addOptionalParam("speed", "Defender Relayer speed param: 'safeLow' | 'average' | 'fast' | 'fastest'", "fast", types.string)
.setAction(async (taskArgs, hre) => {
const signer = await getSigner(hre, taskArgs.speed)
console.log("taskArgs.topLineConfig", taskArgs.topLineConfig)

const emissionsController = await deployEmissionsController(signer, hre, taskArgs.deployProxy, MCCP24_CONFIG)

Expand Down
2 changes: 1 addition & 1 deletion tasks/utils/emissions-utils.ts
Expand Up @@ -37,7 +37,7 @@ export interface TopLevelConfig {
EPOCHS: number
}

export const DEFAULT_CONFIG: TopLevelConfig = {
export const POLYNOMIAL_CONFIG: TopLevelConfig = {
A: -166000000000000,
B: 168479942061125,
C: -168479942061125,
Expand Down
13 changes: 0 additions & 13 deletions test/emissions/emission-controller.spec.ts
Expand Up @@ -21,9 +21,6 @@ import { currentWeekEpoch, increaseTime, getTimestamp, increaseTimeTo, startWeek
import { Account } from "types/common"
import { keccak256, toUtf8Bytes } from "ethers/lib/utils"
import { MCCP24_CONFIG, TopLevelConfig } from "tasks/utils/emissions-utils"
import { usdFormatter } from "tasks/utils"

const debug = false

const INITIAL_DIALS_NO = 3

Expand Down Expand Up @@ -156,13 +153,6 @@ const expectTopLineEmissionForEpoch =
async (deltaEpoch: number): Promise<void> => {
const emissionForEpoch = await emissionsController.topLineEmission(startEpoch + deltaEpoch)
const expectedEmissionAmount = await nextRewardAmount(emissionsController, topLevelConfig, deltaEpoch)
if (debug)
console.log(
"馃殌 expectTopLineEmissionForEpoch ~ emissionForEpoch",
deltaEpoch.toString(),
emissionForEpoch.toString(),
usdFormatter(expectedEmissionAmount),
)
expect(emissionForEpoch).eq(expectedEmissionAmount)
}
export const snapDial = async (emissionsController: EmissionsController, dialId: number): Promise<DialData> => {
Expand Down Expand Up @@ -245,9 +235,6 @@ describe("EmissionsController", async () => {
voter1 = sa.dummy1
voter2 = sa.dummy2
voter3 = sa.dummy3
// console.log(`Voter 1 ${voter1.address}`)
// console.log(`Voter 2 ${voter2.address}`)
// console.log(`Voter 3 ${voter3.address}`)

// Set the time to Thursday, 01:00am UTC time which is just after the start of the distribution period
const currentTime = await getTimestamp()
Expand Down
2 changes: 1 addition & 1 deletion test/savings/savings-manager.spec.ts
Expand Up @@ -675,7 +675,7 @@ describe("SavingsManager", async () => {
assertBNClose(
BN.from(interectCollectedEvent.args.apy),
expectedAPY,
simpleToExactAmount(2, 12), // allow for a 0.00001 deviation in the percentage
simpleToExactAmount(2, 12), // allow for a 0.00002 deviation in the percentage
)
const lastCollectionAfter = await savingsManager.lastCollection(mUSD.address)
assertBNClose(lastCollectionAfter, curTime, BN.from(2))
Expand Down

0 comments on commit 7dd1f72

Please sign in to comment.