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

@giveth/commons-abc-contracts

Package Overview
Dependencies
Maintainers
3
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@giveth/commons-abc-contracts - npm Package Compare versions

Comparing version 0.1.14 to 0.1.15

2

package.json
{
"name": "@giveth/commons-abc-contracts",
"version": "0.1.14",
"version": "0.1.15",
"devDependencies": {

@@ -5,0 +5,0 @@ "chai": "^4.2.0",

const { BN, constants, expectEvent, shouldFail } = require('openzeppelin-test-helpers');
const CommonsToken = artifacts.require("CommonsToken.sol");

@@ -9,2 +8,3 @@ const FundingPoolMock = artifacts.require("FundingPoolMock.sol");

const DENOMINATOR_PPM = 1000000;
contract("CommonsToken", ([reserveTokenMinter, contractCreator, hatcherOne, hatcherTwo, lateInvestor]) => {

@@ -118,4 +118,4 @@ const reserveRatio = 142857; // kappa ~ 6

it("Should have minted the correct amount to the fundingPool", async function() {
let internalTokensInFundingPool = await this.commonsToken.balanceOf(this.fundingPool.address)
assert.equal(internalTokensInFundingPool, (initialRaise / p0 ) * (theta / DENOMINATOR_PPM));
let internalTokensInFundingPool = await this.commonsToken.balanceOf(this.fundingPool.address);
assert.equal(internalTokensInFundingPool, (initialRaise / p0) * (theta / DENOMINATOR_PPM));
})

@@ -125,7 +125,7 @@

let internalTokensReserve = await this.commonsToken.balanceOf(this.commonsToken.address);
assert.equal(internalTokensInFundingPool, (initialRaise / p0 ) * (1 - (theta / DENOMINATOR_PPM)));
assert.equal(internalTokensReserve, (initialRaise / p0) * (1 - (theta / DENOMINATOR_PPM)));
})
it("Should have ended the hatching phase", async function() {
let isHatched = await this.isHatched();
let isHatched = await this.commonsToken.isHatched();
assert.isTrue(isHatched);

@@ -142,3 +142,2 @@ })

beforeEach(async function() {
// problem. The msg.sender is the smart contract.
await this.reserveToken.approve(this.commonsToken.address, amountToFundExtern, {from: hatcherOne});

@@ -148,2 +147,4 @@ await this.commonsToken.hatchContribute(amountToFundExtern, {from: hatcherOne});

it('reverts', async function() {
let isHatched = await this.commonsToken.isHatched();
assert.isTrue(isHatched);
await shouldFail.reverting(this.commonsToken.hatchContribute(amountToFundExtern, {from: hatcherOne}))

@@ -169,7 +170,19 @@ })

describe("When the sender is not the fundingPool", function() {
//reverts
it("reverts", async function() {
await shouldFail.reverting(this.commonsToken.fundsAllocated(3000));
});
})
})
describe("claimFunds", function() {
describe("when we are claiming tokens", function() {
describe("when we have remaining locked tokens", function() {
// receive internal tokens in our balance
});
describe("when we do not have any more locked tokens", function() {
// reverts
});
});
});
describe("burn", function() {

@@ -183,8 +196,8 @@ describe("When we are not in the hatching phase", function() {

describe("When the callee has not enough internal tokens", function() {
//revert
// revert
})
})
describe("When we are in the hatchin phase", function() {
//reverts
describe("When we are in the hatching phase", function() {
// reverts
})

@@ -196,6 +209,5 @@ })

})
describe("When we are in the hatching phase", function() {
// reverts
})

@@ -202,0 +214,0 @@ })

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