Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ pragma experimental ABIEncoderV2;
import { Address } from "@openzeppelin/contracts/utils/Address.sol";
import { SafeMath } from "@openzeppelin/contracts/math/SafeMath.sol";

import { GraphTokenLock, MathUtils } from "./GraphTokenLock.sol";
import { GraphTokenLock } from "./GraphTokenLock.sol";
import { IGraphTokenLock } from "./IGraphTokenLock.sol";
import { IGraphTokenLockManager } from "./IGraphTokenLockManager.sol";

Expand Down
6 changes: 1 addition & 5 deletions packages/token-distribution/test/tokenLockWallet.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,12 @@ import { DeployOptions } from 'hardhat-deploy/types'

import { GraphTokenLockManager, GraphTokenLockWallet, GraphTokenMock, StakingMock } from '../types'
import { defaultInitArgs, Revocability, TokenLockParameters } from './config'
import { Account, advanceBlocks, advanceTimeAndBlock, getAccounts, getContract, randomHexBytes, toGRT } from './network'
import { Account, advanceTimeAndBlock, getAccounts, getContract, randomHexBytes, toGRT } from './network'

const { AddressZero, MaxUint256 } = constants

// -- Time utils --

const advancePeriods = async (tokenLock: GraphTokenLockWallet, n = 1) => {
const periodDuration = await tokenLock.periodDuration()
return advanceTimeAndBlock(periodDuration.mul(n).toNumber()) // advance N period
}
const advanceToStart = async (tokenLock: GraphTokenLockWallet) => moveToTime(tokenLock, await tokenLock.startTime(), 60)
const moveToTime = async (tokenLock: GraphTokenLockWallet, target: BigNumber, buffer: number) => {
const ts = await tokenLock.currentTime()
Expand Down