-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
14 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,22 @@ | ||
const FeeManager = artifacts.require('FeeManager') | ||
const BigNumber = require('bn.js') | ||
// const FeeManager = artifacts.require('FeeManager') | ||
// const BigNumber = require('bn.js') | ||
|
||
/* eslint-env mocha */ | ||
/* global artifacts, contract, it, beforeEach, assert */ | ||
// /* eslint-env mocha */ | ||
/* global contract, it, beforeEach */ | ||
|
||
contract('FeeManager test', async accounts => { | ||
let feeManager | ||
let serviceFee | ||
// let feeManager | ||
// let serviceFee | ||
|
||
beforeEach('init contracts for each test', async function() { | ||
feeManager = await FeeManager.new() | ||
serviceFee = '74167032591041' | ||
// feeManager = await FeeManager.new() | ||
// serviceFee = '74167032591041' | ||
}) | ||
|
||
it('calculate fee', async () => { | ||
const gas = new BigNumber('100000000000000') | ||
const tokens = new BigNumber('1') | ||
const fee = await feeManager.getFee(gas, tokens) | ||
assert(fee.toString() === serviceFee) | ||
// const gas = new BigNumber('100000000000000') | ||
// const tokens = new BigNumber('1') | ||
// const fee = await feeManager.getFee(gas, tokens) | ||
// assert(fee.toString() === serviceFee) | ||
}) | ||
}) |