From 843f0f8e892ee17b38c66132fad7fe59d934b27c Mon Sep 17 00:00:00 2001 From: arsenyjin Date: Mon, 4 May 2020 10:31:44 +0200 Subject: [PATCH 1/2] fix inconsistent naming --- .../fee/{Collector.sol => FeeCalculator.sol} | 2 +- .../fee/{Calculator.sol => FeeCollector.sol} | 2 +- contracts/fee/{Manager.sol => FeeManager.sol} | 4 ++-- contracts/templates/ERC20Template.sol | 2 +- test/TokenFactory.js | 20 ------------------- test/unit/Factory.Test.js | 2 +- 6 files changed, 6 insertions(+), 26 deletions(-) rename contracts/fee/{Collector.sol => FeeCalculator.sol} (56%) rename contracts/fee/{Calculator.sol => FeeCollector.sol} (57%) rename contracts/fee/{Manager.sol => FeeManager.sol} (92%) delete mode 100644 test/TokenFactory.js diff --git a/contracts/fee/Collector.sol b/contracts/fee/FeeCalculator.sol similarity index 56% rename from contracts/fee/Collector.sol rename to contracts/fee/FeeCalculator.sol index 7afc45ad0..a5e10d2b4 100644 --- a/contracts/fee/Collector.sol +++ b/contracts/fee/FeeCalculator.sol @@ -1,6 +1,6 @@ pragma solidity ^0.5.7; -contract Collector { +contract FeeCalculator { } \ No newline at end of file diff --git a/contracts/fee/Calculator.sol b/contracts/fee/FeeCollector.sol similarity index 57% rename from contracts/fee/Calculator.sol rename to contracts/fee/FeeCollector.sol index 4b741f1d0..5a1b7743a 100644 --- a/contracts/fee/Calculator.sol +++ b/contracts/fee/FeeCollector.sol @@ -1,6 +1,6 @@ pragma solidity ^0.5.7; -contract Calculator { +contract FeeCollector { } \ No newline at end of file diff --git a/contracts/fee/Manager.sol b/contracts/fee/FeeManager.sol similarity index 92% rename from contracts/fee/Manager.sol rename to contracts/fee/FeeManager.sol index cfca57da6..960b13085 100644 --- a/contracts/fee/Manager.sol +++ b/contracts/fee/FeeManager.sol @@ -1,7 +1,7 @@ pragma solidity ^0.5.7; -import './Calculator.sol'; -import './Collector.sol'; +import './FeeCalculator.sol'; +import './FeeCollector.sol'; import 'openzeppelin-solidity/contracts/math/SafeMath.sol'; contract FeeManager { diff --git a/contracts/templates/ERC20Template.sol b/contracts/templates/ERC20Template.sol index 4bcf1ef4f..7b35a3c68 100644 --- a/contracts/templates/ERC20Template.sol +++ b/contracts/templates/ERC20Template.sol @@ -1,6 +1,6 @@ pragma solidity ^0.5.7; -import '../fee/Manager.sol'; +import '../fee/FeeManager.sol'; import './token/ERC20Pausable.sol'; /** diff --git a/test/TokenFactory.js b/test/TokenFactory.js deleted file mode 100644 index 4f94b43b2..000000000 --- a/test/TokenFactory.js +++ /dev/null @@ -1,20 +0,0 @@ -const Factory = artifacts.require("Factory"); - -const truffleAssert = require('truffle-assertions'); - -contract("TokenFactory test", async accounts => { - let factory; - - beforeEach('innit contracts for each test', async function () { - - factory = await Factory.deployed(); - - }) - - it("should create a token", async () => { - - truffleAssert.passes(factory.createToken("logic", "TestDataToken", "TDT", accounts[0])); - - }); - -}); diff --git a/test/unit/Factory.Test.js b/test/unit/Factory.Test.js index 7f26d402c..482a8d717 100644 --- a/test/unit/Factory.Test.js +++ b/test/unit/Factory.Test.js @@ -2,7 +2,7 @@ const Factory = artifacts.require("Factory"); const truffleAssert = require('truffle-assertions'); -contract("actory test", async accounts => { +contract("Factory test", async accounts => { let factory; beforeEach('innit contracts for each test', async function () { From 588216cd1b39d9492a73b3ce25926e8109079d46 Mon Sep 17 00:00:00 2001 From: arsenyjin Date: Mon, 4 May 2020 16:12:08 +0200 Subject: [PATCH 2/2] fix build error --- test/unit/Factory.Test.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/test/unit/Factory.Test.js b/test/unit/Factory.Test.js index a2ba5a381..2a4b13f51 100644 --- a/test/unit/Factory.Test.js +++ b/test/unit/Factory.Test.js @@ -2,8 +2,6 @@ const Factory = artifacts.require("Factory"); const truffleAssert = require('truffle-assertions'); -contract("Factory test", async accounts => { - contract("factory test", async accounts => { let factory;