Skip to content
This repository has been archived by the owner on Oct 26, 2022. It is now read-only.

Commit

Permalink
removed start
Browse files Browse the repository at this point in the history
  • Loading branch information
sarangparikh22 committed Jun 3, 2022
1 parent 5b68933 commit 9cd3421
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 42 deletions.
1 change: 0 additions & 1 deletion contracts/base/FuroStream.sol
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ contract FuroStream is
override
returns (uint256 streamId, uint256 depositedShares)
{
if (startTime < block.timestamp) revert InvalidStartTime();
if (endTime <= startTime) revert InvalidEndTime();

depositedShares = _depositToken(
Expand Down
1 change: 0 additions & 1 deletion contracts/base/FuroVesting.sol
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ contract FuroVesting is
uint128 cliffShares
)
{
if (vestParams.start < block.timestamp) revert InvalidStart();
if (vestParams.stepPercentage > PERCENTAGE_PRECISION)
revert InvalidStepSetting();
if (vestParams.stepDuration == 0 || vestParams.steps == 0)
Expand Down
25 changes: 1 addition & 24 deletions test/furo-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -235,27 +235,6 @@ describe("Stream Creation", function () {
).to.be.revertedWith(customError("NotSender"));
});

it("should not be able create stream when startTime is less than block.timestamp", async function () {
const startTime = await latest();
const endTime = startTime.add(BigNumber.from(3600));

const amount = getBigNumber(10000);
const amountToShares = await toShare(bento, tokens[0], amount);

const amountToDeposit = amountToShares;

await expect(
furoStream.createStream(
accounts[1].address,
tokens[0].address,
startTime,
endTime,
amountToDeposit,
true
)
).to.be.revertedWith(customError("InvalidStartTime"));
});

it("should not be able create stream when endTime is less than startTime", async function () {
await expect(
furoStream.createStream(
Expand Down Expand Up @@ -1342,9 +1321,7 @@ describe("Stream Creation - Batchable", function () {
false,
]
);
await furoStream.multicall(
[masterContractApprovalData, createStreamData]
);
await furoStream.multicall([masterContractApprovalData, createStreamData]);
const newStreamId = await snapshotStreamId(furoStream);
const newStreamData = await snapshotStreamData(furoStream, oldStreamId);
const tokenBalanceAfter = await tokens[0].balanceOf(accounts[0].address);
Expand Down
16 changes: 0 additions & 16 deletions test/furo-vest-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,22 +197,6 @@ describe("Create Vest", () => {
)
);
});

it("should not allow to create vest with old start", async function () {
await expect(
furoVesting.createVesting({
token: tokens[0].address,
recipient: accounts[1].address,
start: startTime.sub(1000),
cliffDuration: ONE_YEAR,
stepDuration: ONE_MONTH,
steps: steps,
stepPercentage: stepPercentage,
amount: amount,
fromBentoBox: true,
})
).to.be.revertedWith("InvalidStart()");
});
});

describe("Balances", () => {
Expand Down

0 comments on commit 9cd3421

Please sign in to comment.