New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@tokenfoundry/sale-contracts

Package Overview
Dependencies
Maintainers
4
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tokenfoundry/sale-contracts - npm Package Compare versions

Comparing version 0.2.0 to 0.2.2

2

package.json
{
"name": "@tokenfoundry/sale-contracts",
"version": "0.2.0",
"version": "0.2.2",
"description": "Code for the new token foundry token and sale base contracts.",

@@ -5,0 +5,0 @@ "repository": "https://github.com/tokenfoundry/sale-contracts.git",

@@ -41,2 +41,5 @@ import increaseTime, { duration } from './helpers/increaseTime';

let vaultInitialAmount;
let vaultDisbursementAmount;
let contributionLimit;

@@ -59,2 +62,5 @@ let contributionLimitBig;

vaultInitialAmount = new web3.BigNumber(1000);
vaultDisbursementAmount = new web3.BigNumber(1000);
contributionLimit = new web3.BigNumber(5000);

@@ -84,2 +90,4 @@ contributionLimitBig = contributionCap.add(1000);

waitingDuration,
vaultInitialAmount,
vaultDisbursementAmount,
startTime,

@@ -141,2 +149,3 @@ { from: owner }

await expectThrow(sale.setEndTime(latest + duration.weeks(1), { from: owner } ));
await expectThrow(sale.emergencyEndSale());
});

@@ -305,2 +314,12 @@

it('should end the sale immediately if emergencyEndSale is called by the sale owner', async () => {
await sale.emergencyEndSale({ from: owner });
const stageId = await sale.getCurrentStageId.call();
assert.equal(web3.toUtf8(stageId), 'saleEnded');
});
it('should not end the sale someone else tries to emergencyEndSale', async () => {
await expectThrow(sale.emergencyEndSale({ from: nonOwner }));
});
it ('should not go to SALE_ENDED stage if the cap is not reached or if the end timestamp not passed', async () => {

@@ -414,2 +433,4 @@ let stageId = await sale.getCurrentStageId.call();

await expectThrow(sale.emergencyEndSale());
const newSaleEndTime = endTime + duration.weeks(1);

@@ -416,0 +437,0 @@ await expectThrow(sale.setEndTime(newSaleEndTime));

@@ -55,4 +55,5 @@ import increaseTime, { duration } from './helpers/increaseTime';

it('should accept contributions', async () => {
it('should only be possible for the owner to send contributions', async () => {
const value = 10000;
await expectThrow(vault.deposit(contributor, { value, from: notOwner }));
await vault.deposit(contributor, { value, from: owner });

@@ -74,3 +75,2 @@

await expectThrow(vault.saleSuccessful({ from: notOwner }));

@@ -102,2 +102,8 @@

assert.isTrue(post.minus(pre).equals(value));
const pre_notContributor = web3.eth.getBalance(notContributor);
await vault.refund(notContributor);
const post_notContributor = web3.eth.getBalance(notContributor);
assert.isTrue(post_notContributor.equals(pre_notContributor));
});

@@ -158,2 +164,3 @@

await expectThrow(vault.beginClosingPeriod({ from: notOwner }));
await vault.beginClosingPeriod();

@@ -160,0 +167,0 @@ const closingDeadline = await vault.closingDeadline.call();

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc