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

fmg-simple-adjudicator

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fmg-simple-adjudicator - npm Package Compare versions

Comparing version 0.0.6 to 0.0.8

4

package.json
{
"name": "fmg-simple-adjudicator",
"version": "0.0.6",
"version": "0.0.8",
"description": "Simple adjudicator for force-move games",

@@ -22,5 +22,5 @@ "directories": {

"esm": "^3.0.52",
"truffle-assertions": "^0.3.1",
"truffle-assertions": "^0.4.0",
"truffle-core": "^4.1.11"
}
}

@@ -13,4 +13,4 @@ import { Channel, State, assertRevert, increaseTime, duration, CountingGame } from 'fmg-core';

const B_IDX = 2;
const aBal = Number(web3.toWei(6, "ether"));
const bBal = Number(web3.toWei(4, "ether"));
const aBal = Number(web3.toWei('6', "ether"));
const bBal = Number(web3.toWei('4', "ether"));
const resolution = [aBal, bBal];

@@ -373,2 +373,41 @@ const differentResolution = [bBal, aBal];

});
describe('events', async () => {
it('emits fundsReceived upon contract creation', async () => {
CountingStateContract.link(StateLib);
let stateContract = await CountingStateContract.new();
CountingGameContract.link('CountingState', stateContract.address);
let countingGameContract = await CountingGameContract.new();
channel = new Channel(countingGameContract.address, 0, [accounts[A_IDX], accounts[B_IDX]]);
simpleAdj = await SimpleAdjudicator.new(channel.id);
let result = await truffleAssert.createTransactionResult(simpleAdj, simpleAdj.transactionHash);
truffleAssert.eventEmitted(result, 'FundsReceived', (event) => {
return (
event.adjudicatorBalance.toPrecision(1) === '0'
);
});
});
it('emits fundsReceived upon being sent funds', async () => {
await simpleAdj.sendTransaction({
from: accounts[9],
value: 50
});
let result = await simpleAdj.sendTransaction({
from: accounts[9],
value: 100
});
truffleAssert.eventEmitted(result, 'FundsReceived', (event) => {
return (
event.adjudicatorBalance.toPrecision(3) === '150' &&
event.sender === accounts[9] &&
event.amountReceived.toPrecision(3) === '100'
);
});
})
});
});

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