From b67856c69d3536f28d51b75b270dfff79343bf93 Mon Sep 17 00:00:00 2001 From: AugustoL Date: Wed, 17 Jan 2018 16:24:29 -0300 Subject: [PATCH] Separate ERC20 and ERC827 form tokens implementations in contracts and test folders --- contracts/lifecycle/TokenDestructible.sol | 2 +- contracts/mocks/DetailedERC20Mock.sol | 2 +- contracts/mocks/ERC827TokenMock.sol | 2 +- contracts/mocks/SafeERC20Helper.sol | 4 ++-- contracts/ownership/CanReclaimToken.sol | 4 ++-- contracts/token/BasicToken.sol | 2 +- contracts/token/{ => ERC20}/DetailedERC20.sol | 0 contracts/token/{ => ERC20}/ERC20.sol | 0 contracts/token/{ => ERC20}/ERC20Basic.sol | 0 contracts/token/{ => ERC20}/SafeERC20.sol | 0 contracts/token/{ => ERC827}/ERC827.sol | 2 +- contracts/token/{ => ERC827}/ERC827Token.sol | 2 +- contracts/token/StandardToken.sol | 2 +- contracts/token/TokenTimelock.sol | 3 +-- contracts/token/TokenVesting.sol | 4 ++-- test/token/{erc => ERC20}/DetailedERC20.test.js | 0 test/token/{erc => ERC20}/SafeERC20.test.js | 0 test/token/{erc => ERC827}/ERC827Token.js | 0 18 files changed, 14 insertions(+), 15 deletions(-) rename contracts/token/{ => ERC20}/DetailedERC20.sol (100%) rename contracts/token/{ => ERC20}/ERC20.sol (100%) rename contracts/token/{ => ERC20}/ERC20Basic.sol (100%) rename contracts/token/{ => ERC20}/SafeERC20.sol (100%) rename contracts/token/{ => ERC827}/ERC827.sol (95%) rename contracts/token/{ => ERC827}/ERC827Token.sol (99%) rename test/token/{erc => ERC20}/DetailedERC20.test.js (100%) rename test/token/{erc => ERC20}/SafeERC20.test.js (100%) rename test/token/{erc => ERC827}/ERC827Token.js (100%) diff --git a/contracts/lifecycle/TokenDestructible.sol b/contracts/lifecycle/TokenDestructible.sol index 0bca30e7b82..131e57a5797 100644 --- a/contracts/lifecycle/TokenDestructible.sol +++ b/contracts/lifecycle/TokenDestructible.sol @@ -1,7 +1,7 @@ pragma solidity ^0.4.18; import "../ownership/Ownable.sol"; -import "../token/ERC20Basic.sol"; +import "../token/ERC20/ERC20Basic.sol"; /** diff --git a/contracts/mocks/DetailedERC20Mock.sol b/contracts/mocks/DetailedERC20Mock.sol index 83fc96b3802..81aca044afe 100644 --- a/contracts/mocks/DetailedERC20Mock.sol +++ b/contracts/mocks/DetailedERC20Mock.sol @@ -1,7 +1,7 @@ pragma solidity ^0.4.18; import "../token/StandardToken.sol"; -import "../token/DetailedERC20.sol"; +import "../token/ERC20/DetailedERC20.sol"; contract DetailedERC20Mock is StandardToken, DetailedERC20 { diff --git a/contracts/mocks/ERC827TokenMock.sol b/contracts/mocks/ERC827TokenMock.sol index 8408d80e09a..9ac16cc6399 100644 --- a/contracts/mocks/ERC827TokenMock.sol +++ b/contracts/mocks/ERC827TokenMock.sol @@ -1,7 +1,7 @@ pragma solidity ^0.4.13; -import "../token/ERC827Token.sol"; +import "../token/ERC827/ERC827Token.sol"; // mock class using ERC827 Token diff --git a/contracts/mocks/SafeERC20Helper.sol b/contracts/mocks/SafeERC20Helper.sol index d41e7a5e1aa..1a9bcdfc2ba 100644 --- a/contracts/mocks/SafeERC20Helper.sol +++ b/contracts/mocks/SafeERC20Helper.sol @@ -1,7 +1,7 @@ pragma solidity ^0.4.18; -import "../token/ERC20.sol"; -import "../token/SafeERC20.sol"; +import "../token/ERC20/ERC20.sol"; +import "../token/ERC20/SafeERC20.sol"; contract ERC20FailingMock is ERC20 { diff --git a/contracts/ownership/CanReclaimToken.sol b/contracts/ownership/CanReclaimToken.sol index ab85e173652..69fb95c6e21 100644 --- a/contracts/ownership/CanReclaimToken.sol +++ b/contracts/ownership/CanReclaimToken.sol @@ -1,8 +1,8 @@ pragma solidity ^0.4.18; import "./Ownable.sol"; -import "../token/ERC20Basic.sol"; -import "../token/SafeERC20.sol"; +import "../token/ERC20/ERC20Basic.sol"; +import "../token/ERC20/SafeERC20.sol"; /** diff --git a/contracts/token/BasicToken.sol b/contracts/token/BasicToken.sol index 469fedbccaf..46e8bf87016 100644 --- a/contracts/token/BasicToken.sol +++ b/contracts/token/BasicToken.sol @@ -1,7 +1,7 @@ pragma solidity ^0.4.18; -import "./ERC20Basic.sol"; +import "./ERC20/ERC20Basic.sol"; import "../math/SafeMath.sol"; diff --git a/contracts/token/DetailedERC20.sol b/contracts/token/ERC20/DetailedERC20.sol similarity index 100% rename from contracts/token/DetailedERC20.sol rename to contracts/token/ERC20/DetailedERC20.sol diff --git a/contracts/token/ERC20.sol b/contracts/token/ERC20/ERC20.sol similarity index 100% rename from contracts/token/ERC20.sol rename to contracts/token/ERC20/ERC20.sol diff --git a/contracts/token/ERC20Basic.sol b/contracts/token/ERC20/ERC20Basic.sol similarity index 100% rename from contracts/token/ERC20Basic.sol rename to contracts/token/ERC20/ERC20Basic.sol diff --git a/contracts/token/SafeERC20.sol b/contracts/token/ERC20/SafeERC20.sol similarity index 100% rename from contracts/token/SafeERC20.sol rename to contracts/token/ERC20/SafeERC20.sol diff --git a/contracts/token/ERC827.sol b/contracts/token/ERC827/ERC827.sol similarity index 95% rename from contracts/token/ERC827.sol rename to contracts/token/ERC827/ERC827.sol index f0793e607a0..31a17cd809f 100644 --- a/contracts/token/ERC827.sol +++ b/contracts/token/ERC827/ERC827.sol @@ -1,7 +1,7 @@ pragma solidity ^0.4.13; -import "./ERC20.sol"; +import "../ERC20/ERC20.sol"; /** diff --git a/contracts/token/ERC827Token.sol b/contracts/token/ERC827/ERC827Token.sol similarity index 99% rename from contracts/token/ERC827Token.sol rename to contracts/token/ERC827/ERC827Token.sol index 173acf98f46..f027c80ff3d 100644 --- a/contracts/token/ERC827Token.sol +++ b/contracts/token/ERC827/ERC827Token.sol @@ -1,7 +1,7 @@ pragma solidity ^0.4.13; import "./ERC827.sol"; -import "./StandardToken.sol"; +import "../StandardToken.sol"; /** @title ERC827, an extension of ERC20 token standard diff --git a/contracts/token/StandardToken.sol b/contracts/token/StandardToken.sol index 1aa10d3f912..a3a1c34457a 100644 --- a/contracts/token/StandardToken.sol +++ b/contracts/token/StandardToken.sol @@ -2,7 +2,7 @@ pragma solidity ^0.4.18; import "./BasicToken.sol"; -import "./ERC20.sol"; +import "./ERC20/ERC20.sol"; /** diff --git a/contracts/token/TokenTimelock.sol b/contracts/token/TokenTimelock.sol index 3fd0103a518..2562b094018 100644 --- a/contracts/token/TokenTimelock.sol +++ b/contracts/token/TokenTimelock.sol @@ -1,7 +1,6 @@ pragma solidity ^0.4.18; -import "./ERC20Basic.sol"; -import "../token/SafeERC20.sol"; +import "./ERC20/SafeERC20.sol"; /** diff --git a/contracts/token/TokenVesting.sol b/contracts/token/TokenVesting.sol index 01bdff34e7c..a8b45c01e25 100644 --- a/contracts/token/TokenVesting.sol +++ b/contracts/token/TokenVesting.sol @@ -1,7 +1,7 @@ pragma solidity ^0.4.18; -import "./ERC20Basic.sol"; -import "./SafeERC20.sol"; +import "./ERC20/ERC20Basic.sol"; +import "./ERC20/SafeERC20.sol"; import "../ownership/Ownable.sol"; import "../math/SafeMath.sol"; diff --git a/test/token/erc/DetailedERC20.test.js b/test/token/ERC20/DetailedERC20.test.js similarity index 100% rename from test/token/erc/DetailedERC20.test.js rename to test/token/ERC20/DetailedERC20.test.js diff --git a/test/token/erc/SafeERC20.test.js b/test/token/ERC20/SafeERC20.test.js similarity index 100% rename from test/token/erc/SafeERC20.test.js rename to test/token/ERC20/SafeERC20.test.js diff --git a/test/token/erc/ERC827Token.js b/test/token/ERC827/ERC827Token.js similarity index 100% rename from test/token/erc/ERC827Token.js rename to test/token/ERC827/ERC827Token.js