Skip to content

Commit

Permalink
formatt files
Browse files Browse the repository at this point in the history
  • Loading branch information
YouStillAlive committed Sep 21, 2022
1 parent c7b14de commit 82f0630
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion contracts/ERC20Token.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "poolz-helper-v2/contracts/token/ERC20Token.sol";
import "poolz-helper-v2/contracts/token/ERC20Token.sol";
14 changes: 7 additions & 7 deletions test/4_Access.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,14 @@ contract("Access to Locked Deal", (accounts) => {
owner = newOwner
})

it('should get pool transfer status', async () => {
it("should get pool transfer status", async () => {
let date = new Date()
date.setDate(date.getDate() + 1)
let startTime = Math.floor(date.getTime() / 1000)
let finishTime = startTime + 60 * 60 * 24 * 30
const tx = await instance.CreateNewPool(Token.address, startTime, finishTime, allow, owner, { from: fromAddress })
const tx = await instance.CreateNewPool(Token.address, startTime, finishTime, allow, owner, {
from: fromAddress
})
poolId = tx.logs[1].args.PoolId
await timeMachine.advanceBlockAndSetTime(finishTime)
const status = await instance.isTransferPoolActive(poolId)
Expand All @@ -61,7 +63,7 @@ contract("Access to Locked Deal", (accounts) => {
await timeMachine.advanceBlockAndSetTime(Math.floor(Date.now() / 1000))
})

it('Split Pool Amount with owner address', async () => {
it("Split Pool Amount with owner address", async () => {
let date = new Date()
date.setDate(date.getDate() + 1)
let startTime = Math.floor(date.getTime() / 1000)
Expand Down Expand Up @@ -140,8 +142,8 @@ contract("Access to Locked Deal", (accounts) => {
"Can't be the same owner"
)
})
it('Fail to Create Pool with 0 address owner', async () => {

it("Fail to Create Pool with 0 address owner", async () => {
const allow = 100
let date = new Date()
date.setDate(date.getDate() + 1)
Expand Down Expand Up @@ -202,7 +204,5 @@ contract("Access to Locked Deal", (accounts) => {
)
await timeMachine.advanceBlockAndSetTime(Math.floor(Date.now() / 1000))
})


})
})
14 changes: 7 additions & 7 deletions test/7_Withdraw.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
const LockedDealV2 = artifacts.require("LockedDealV2")
const TestToken = artifacts.require("ERC20Token")
const { assert } = require('chai')
const timeMachine = require('ganache-time-traveler')
const constants = require('@openzeppelin/test-helpers/src/constants.js');
const { assert } = require("chai")
const timeMachine = require("ganache-time-traveler")
const constants = require("@openzeppelin/test-helpers/src/constants.js")
const BigNumber = require("bignumber.js")

contract("Withdraw", (accounts) => {
Expand All @@ -18,7 +18,7 @@ contract("Withdraw", (accounts) => {
await Token.approve(instance.address, constants.MAX_UINT256, { from: fromAddress })
})

it('should create a single new pool', async () => {
it("should create a single new pool", async () => {
const date = new Date()
const startTime = Math.floor(date.getTime() / 1000)
date.setDate(date.getDate() + 2)
Expand Down Expand Up @@ -50,7 +50,7 @@ contract("Withdraw", (accounts) => {
assert.equal(expectedResult, result.toString(), "check return value")
})

it('finish time < now', async () => {
it("finish time < now", async () => {
const date = new Date()
const startTime = Math.floor(date.getTime() / 1000)
date.setDate(date.getDate() + 1)
Expand Down Expand Up @@ -79,7 +79,7 @@ contract("Withdraw", (accounts) => {
assert.equal("0", result.toString(), "check debited amount")
})

it('Withdraw tokens', async () => {
it("Withdraw tokens", async () => {
const date = new Date()
date.setDate(date.getDate() - 1)
const startTime = Math.floor(date.getTime() / 1000)
Expand Down Expand Up @@ -196,7 +196,7 @@ contract("Withdraw", (accounts) => {
const date = new Date()
const startTime = Math.floor(date.getTime() / 1000)
const finishTime = startTime + 120 // add two minutes
const halfTime = finishTime - 60 // 1 min after start time
const halfTime = finishTime - 60 // 1 min after start time
let tx = await instance.CreateNewPool(Token.address, startTime, finishTime, allow, owner, {
from: fromAddress
})
Expand Down

0 comments on commit 82f0630

Please sign in to comment.