Browse Source

fix: reference contract name rather than filepath (#698)

Matt Condon 7 years ago
parent
commit
f4228f1b49
39 changed files with 49 additions and 51 deletions
  1. 1 1
      migrations/1_initial_migration.js
  2. 1 1
      migrations/2_deploy_contracts.js
  3. 2 2
      test/Bounty.test.js
  4. 1 1
      test/DayLimit.test.js
  5. 1 1
      test/Heritable.test.js
  6. 1 1
      test/LimitBalance.test.js
  7. 2 2
      test/ReentrancyGuard.test.js
  8. 2 2
      test/SimpleSavingsWallet.test.js
  9. 1 1
      test/crowdsale/CappedCrowdsale.test.js
  10. 1 1
      test/crowdsale/FinalizableCrowdsale.test.js
  11. 1 1
      test/crowdsale/RefundableCrowdsale.test.js
  12. 1 1
      test/examples/SimpleToken.test.js
  13. 2 2
      test/library/ECRecovery.test.js
  14. 1 1
      test/library/Math.test.js
  15. 1 1
      test/library/MerkleProof.test.js
  16. 1 1
      test/lifecycle/Destructible.test.js
  17. 1 1
      test/lifecycle/Pausable.test.js
  18. 2 2
      test/lifecycle/TokenDestructible.test.js
  19. 1 1
      test/math/SafeMath.test.js
  20. 2 2
      test/ownership/CanReclaimToken.test.js
  21. 1 1
      test/ownership/Claimable.test.js
  22. 1 1
      test/ownership/Contactable.test.js
  23. 1 1
      test/ownership/DelayedClaimable.test.js
  24. 2 4
      test/ownership/HasNoContracts.test.js
  25. 2 2
      test/ownership/HasNoEther.test.js
  26. 2 2
      test/ownership/HasNoTokens.test.js
  27. 1 1
      test/ownership/Ownable.test.js
  28. 1 1
      test/ownership/rbac/RBAC.test.js
  29. 1 1
      test/payment/PullPayment.test.js
  30. 1 1
      test/payment/SplitPayment.test.js
  31. 1 1
      test/token/BasicToken.test.js
  32. 1 1
      test/token/BurnableToken.test.js
  33. 1 1
      test/token/CappedToken.test.js
  34. 1 1
      test/token/ERC20/DetailedERC20.test.js
  35. 1 1
      test/token/ERC20/SafeERC20.test.js
  36. 2 2
      test/token/ERC827/ERC827Token.js
  37. 1 1
      test/token/MintableToken.test.js
  38. 1 1
      test/token/PausableToken.test.js
  39. 1 1
      test/token/StandardToken.test.js

+ 1 - 1
migrations/1_initial_migration.js

@@ -1,4 +1,4 @@
-var Migrations = artifacts.require('./Migrations.sol');
+var Migrations = artifacts.require('Migrations');
 
 module.exports = function (deployer) {
   deployer.deploy(Migrations);

+ 1 - 1
migrations/2_deploy_contracts.js

@@ -1,4 +1,4 @@
-// var Ownable = artifacts.require("ownership/Ownable.sol");
+// var Ownable = artifacts.require("Ownable");
 
 // NOTE: Use this file to easily deploy the contracts you're writing.
 //   (but make sure to reset this file before committing

+ 2 - 2
test/Bounty.test.js

@@ -6,8 +6,8 @@ let sendReward = function (sender, receiver, value) {
     value: value,
   });
 };
-var SecureTargetBounty = artifacts.require('mocks/SecureTargetBounty.sol');
-var InsecureTargetBounty = artifacts.require('mocks/InsecureTargetBounty.sol');
+var SecureTargetBounty = artifacts.require('SecureTargetBounty');
+var InsecureTargetBounty = artifacts.require('InsecureTargetBounty');
 
 function awaitEvent (event, handler) {
   return new Promise((resolve, reject) => {

+ 1 - 1
test/DayLimit.test.js

@@ -4,7 +4,7 @@ import { increaseTimeTo, duration } from './helpers/increaseTime';
 
 import assertRevert from './helpers/assertRevert';
 
-const DayLimitMock = artifacts.require('mocks/DayLimitMock.sol');
+const DayLimitMock = artifacts.require('DayLimitMock');
 
 contract('DayLimit', function (accounts) {
   let dayLimit;

+ 1 - 1
test/Heritable.test.js

@@ -3,7 +3,7 @@ import expectThrow from './helpers/expectThrow';
 
 const NULL_ADDRESS = '0x0000000000000000000000000000000000000000';
 
-const Heritable = artifacts.require('../contracts/ownership/Heritable.sol');
+const Heritable = artifacts.require('Heritable');
 
 contract('Heritable', function (accounts) {
   let heritable;

+ 1 - 1
test/LimitBalance.test.js

@@ -1,5 +1,5 @@
 import assertRevert from './helpers/assertRevert';
-var LimitBalanceMock = artifacts.require('mocks/LimitBalanceMock.sol');
+var LimitBalanceMock = artifacts.require('LimitBalanceMock');
 
 contract('LimitBalance', function (accounts) {
   let lb;

+ 2 - 2
test/ReentrancyGuard.test.js

@@ -1,7 +1,7 @@
 
 import expectThrow from './helpers/expectThrow';
-const ReentrancyMock = artifacts.require('./mocks/ReentrancyMock.sol');
-const ReentrancyAttack = artifacts.require('./mocks/ReentrancyAttack.sol');
+const ReentrancyMock = artifacts.require('ReentrancyMock');
+const ReentrancyAttack = artifacts.require('ReentrancyAttack');
 
 contract('ReentrancyGuard', function (accounts) {
   let reentrancyMock;

+ 2 - 2
test/SimpleSavingsWallet.test.js

@@ -1,14 +1,14 @@
 
 import expectThrow from './helpers/expectThrow';
 
-const SimpleSavingsWallet = artifacts.require('../contracts/examples/SimpleSavingsWallet.sol');
+const SimpleSavingsWallet = artifacts.require('SimpleSavingsWallet');
 
 contract('SimpleSavingsWallet', function (accounts) {
   let savingsWallet;
   let owner;
 
   const paymentAmount = 4242;
- 
+
   beforeEach(async function () {
     savingsWallet = await SimpleSavingsWallet.new(4141);
     owner = await savingsWallet.owner();

+ 1 - 1
test/crowdsale/CappedCrowdsale.test.js

@@ -11,7 +11,7 @@ require('chai')
   .use(require('chai-bignumber')(BigNumber))
   .should();
 
-const CappedCrowdsale = artifacts.require('mocks/CappedCrowdsaleImpl.sol');
+const CappedCrowdsale = artifacts.require('CappedCrowdsaleImpl');
 const MintableToken = artifacts.require('MintableToken');
 
 contract('CappedCrowdsale', function ([_, wallet]) {

+ 1 - 1
test/crowdsale/FinalizableCrowdsale.test.js

@@ -10,7 +10,7 @@ const should = require('chai')
   .use(require('chai-bignumber')(BigNumber))
   .should();
 
-const FinalizableCrowdsale = artifacts.require('mocks/FinalizableCrowdsaleImpl.sol');
+const FinalizableCrowdsale = artifacts.require('FinalizableCrowdsaleImpl');
 const MintableToken = artifacts.require('MintableToken');
 
 contract('FinalizableCrowdsale', function ([_, owner, wallet, thirdparty]) {

+ 1 - 1
test/crowdsale/RefundableCrowdsale.test.js

@@ -11,7 +11,7 @@ require('chai')
   .use(require('chai-bignumber')(BigNumber))
   .should();
 
-const RefundableCrowdsale = artifacts.require('mocks/RefundableCrowdsaleImpl.sol');
+const RefundableCrowdsale = artifacts.require('RefundableCrowdsaleImpl');
 const MintableToken = artifacts.require('MintableToken');
 
 contract('RefundableCrowdsale', function ([_, owner, wallet, investor]) {

+ 1 - 1
test/examples/SimpleToken.test.js

@@ -1,5 +1,5 @@
 import decodeLogs from '../helpers/decodeLogs';
-const SimpleToken = artifacts.require('SimpleToken.sol');
+const SimpleToken = artifacts.require('SimpleToken');
 
 contract('SimpleToken', accounts => {
   let token;

+ 2 - 2
test/library/ECRecovery.test.js

@@ -1,5 +1,5 @@
-var ECRecoveryMock = artifacts.require('ECRecoveryMock.sol');
-var ECRecoveryLib = artifacts.require('ECRecovery.sol');
+var ECRecoveryMock = artifacts.require('ECRecoveryMock');
+var ECRecoveryLib = artifacts.require('ECRecovery');
 
 var hashMessage = require('../helpers/hashMessage.js');
 

+ 1 - 1
test/library/Math.test.js

@@ -1,4 +1,4 @@
-var MathMock = artifacts.require('../mocks/MathMock.sol');
+var MathMock = artifacts.require('MathMock');
 
 contract('Math', function (accounts) {
   let math;

+ 1 - 1
test/library/MerkleProof.test.js

@@ -2,7 +2,7 @@
 import MerkleTree from '../helpers/merkleTree.js';
 import { sha3, bufferToHex } from 'ethereumjs-util';
 
-var MerkleProof = artifacts.require('MerkleProof.sol');
+var MerkleProof = artifacts.require('MerkleProof');
 
 contract('MerkleProof', function (accounts) {
   let merkleProof;

+ 1 - 1
test/lifecycle/Destructible.test.js

@@ -1,5 +1,5 @@
 
-var Destructible = artifacts.require('../contracts/lifecycle/Destructible.sol');
+var Destructible = artifacts.require('Destructible');
 require('../helpers/transactionMined.js');
 
 contract('Destructible', function (accounts) {

+ 1 - 1
test/lifecycle/Pausable.test.js

@@ -1,6 +1,6 @@
 
 import assertRevert from '../helpers/assertRevert';
-const PausableMock = artifacts.require('mocks/PausableMock.sol');
+const PausableMock = artifacts.require('PausableMock');
 
 contract('Pausable', function (accounts) {
   it('can perform normal process in non-pause', async function () {

+ 2 - 2
test/lifecycle/TokenDestructible.test.js

@@ -1,6 +1,6 @@
 
-var TokenDestructible = artifacts.require('../contracts/lifecycle/TokenDestructible.sol');
-var StandardTokenMock = artifacts.require('mocks/StandardTokenMock.sol');
+var TokenDestructible = artifacts.require('TokenDestructible');
+var StandardTokenMock = artifacts.require('StandardTokenMock');
 require('../helpers/transactionMined.js');
 
 contract('TokenDestructible', function (accounts) {

+ 1 - 1
test/math/SafeMath.test.js

@@ -1,6 +1,6 @@
 import assertRevert from '../helpers/assertRevert';
 const assertJump = require('../helpers/assertJump');
-var SafeMathMock = artifacts.require('mocks/SafeMathMock.sol');
+var SafeMathMock = artifacts.require('SafeMathMock');
 
 contract('SafeMath', function (accounts) {
   let safeMath;

+ 2 - 2
test/ownership/CanReclaimToken.test.js

@@ -1,8 +1,8 @@
 
 import expectThrow from '../helpers/expectThrow';
 
-const CanReclaimToken = artifacts.require('../contracts/ownership/CanReclaimToken.sol');
-const BasicTokenMock = artifacts.require('mocks/BasicTokenMock.sol');
+const CanReclaimToken = artifacts.require('CanReclaimToken');
+const BasicTokenMock = artifacts.require('BasicTokenMock');
 
 contract('CanReclaimToken', function (accounts) {
   let token = null;

+ 1 - 1
test/ownership/Claimable.test.js

@@ -1,7 +1,7 @@
 
 import assertRevert from '../helpers/assertRevert';
 
-var Claimable = artifacts.require('../contracts/ownership/Claimable.sol');
+var Claimable = artifacts.require('Claimable');
 
 contract('Claimable', function (accounts) {
   let claimable;

+ 1 - 1
test/ownership/Contactable.test.js

@@ -1,5 +1,5 @@
 
-var Contactable = artifacts.require('../contracts/ownership/Contactable.sol');
+var Contactable = artifacts.require('Contactable');
 
 contract('Contactable', function (accounts) {
   let contactable;

+ 1 - 1
test/ownership/DelayedClaimable.test.js

@@ -1,6 +1,6 @@
 import assertRevert from '../helpers/assertRevert';
 
-var DelayedClaimable = artifacts.require('../contracts/ownership/DelayedClaimable.sol');
+var DelayedClaimable = artifacts.require('DelayedClaimable');
 
 contract('DelayedClaimable', function (accounts) {
   var delayedClaimable;

+ 2 - 4
test/ownership/HasNoContracts.test.js

@@ -1,10 +1,8 @@
 
 import expectThrow from '../helpers/expectThrow';
 
-const Ownable = artifacts.require('../contracts/ownership/Ownable.sol');
-const HasNoContracts = artifacts.require(
-  '../contracts/ownership/HasNoContracts.sol',
-);
+const Ownable = artifacts.require('Ownable');
+const HasNoContracts = artifacts.require('HasNoContracts');
 
 contract('HasNoContracts', function (accounts) {
   let hasNoContracts = null;

+ 2 - 2
test/ownership/HasNoEther.test.js

@@ -1,8 +1,8 @@
 
 import expectThrow from '../helpers/expectThrow';
 import toPromise from '../helpers/toPromise';
-const HasNoEtherTest = artifacts.require('../mocks/HasNoEtherTest.sol');
-const ForceEther = artifacts.require('../mocks/ForceEther.sol');
+const HasNoEtherTest = artifacts.require('HasNoEtherTest');
+const ForceEther = artifacts.require('ForceEther');
 
 contract('HasNoEther', function (accounts) {
   const amount = web3.toWei('1', 'ether');

+ 2 - 2
test/ownership/HasNoTokens.test.js

@@ -1,8 +1,8 @@
 
 import expectThrow from '../helpers/expectThrow';
 
-const HasNoTokens = artifacts.require('../contracts/lifecycle/HasNoTokens.sol');
-const ERC223TokenMock = artifacts.require('mocks/ERC223TokenMock.sol');
+const HasNoTokens = artifacts.require('HasNoTokens');
+const ERC223TokenMock = artifacts.require('ERC223TokenMock');
 
 contract('HasNoTokens', function (accounts) {
   let hasNoTokens = null;

+ 1 - 1
test/ownership/Ownable.test.js

@@ -1,7 +1,7 @@
 
 import assertRevert from '../helpers/assertRevert';
 
-var Ownable = artifacts.require('../contracts/ownership/Ownable.sol');
+var Ownable = artifacts.require('Ownable');
 
 contract('Ownable', function (accounts) {
   let ownable;

+ 1 - 1
test/ownership/rbac/RBAC.test.js

@@ -1,7 +1,7 @@
 import expectThrow from '../../helpers/expectThrow';
 import expectEvent from '../../helpers/expectEvent';
 
-const RBACMock = artifacts.require('mocks/RBACMock.sol');
+const RBACMock = artifacts.require('RBACMock');
 
 require('chai')
   .use(require('chai-as-promised'))

+ 1 - 1
test/payment/PullPayment.test.js

@@ -1,4 +1,4 @@
-var PullPaymentMock = artifacts.require('mocks/PullPaymentMock.sol');
+var PullPaymentMock = artifacts.require('PullPaymentMock');
 
 contract('PullPayment', function (accounts) {
   let ppce;

+ 1 - 1
test/payment/SplitPayment.test.js

@@ -6,7 +6,7 @@ require('chai')
   .should();
 
 const EVMThrow = require('../helpers/EVMThrow.js');
-const SplitPayment = artifacts.require('../contracts/payment/SplitPayment.sol');
+const SplitPayment = artifacts.require('SplitPayment');
 
 contract('SplitPayment', function ([owner, payee1, payee2, payee3, nonpayee1, payer1]) {
   const amount = web3.toWei(1.0, 'ether');

+ 1 - 1
test/token/BasicToken.test.js

@@ -1,6 +1,6 @@
 import assertRevert from '../helpers/assertRevert';
 
-var BasicTokenMock = artifacts.require('mocks/BasicTokenMock.sol');
+var BasicTokenMock = artifacts.require('BasicTokenMock');
 
 contract('BasicToken', function (accounts) {
   it('should return the correct totalSupply after construction', async function () {

+ 1 - 1
test/token/BurnableToken.test.js

@@ -1,6 +1,6 @@
 
 const EVMRevert = require('../helpers/EVMRevert.js');
-const BurnableTokenMock = artifacts.require('mocks/BurnableTokenMock.sol');
+const BurnableTokenMock = artifacts.require('BurnableTokenMock');
 const BigNumber = web3.BigNumber;
 
 require('chai')

+ 1 - 1
test/token/CappedToken.test.js

@@ -2,7 +2,7 @@
 import expectThrow from '../helpers/expectThrow';
 import ether from '../helpers/ether';
 
-var CappedToken = artifacts.require('../contracts/Tokens/CappedToken.sol');
+var CappedToken = artifacts.require('CappedToken');
 
 contract('Capped', function (accounts) {
   const cap = ether(1000);

+ 1 - 1
test/token/ERC20/DetailedERC20.test.js

@@ -5,7 +5,7 @@ require('chai')
   .use(require('chai-bignumber')(BigNumber))
   .should();
 
-const DetailedERC20Mock = artifacts.require('DetailedERC20Mock.sol');
+const DetailedERC20Mock = artifacts.require('DetailedERC20Mock');
 
 contract('DetailedERC20', accounts => {
   let detailedERC20 = null;

+ 1 - 1
test/token/ERC20/SafeERC20.test.js

@@ -4,7 +4,7 @@ require('chai')
   .use(require('chai-as-promised'))
   .should();
 
-const SafeERC20Helper = artifacts.require('SafeERC20Helper.sol');
+const SafeERC20Helper = artifacts.require('SafeERC20Helper');
 
 contract('SafeERC20', function () {
   beforeEach(async function () {

+ 2 - 2
test/token/ERC827/ERC827Token.js

@@ -1,7 +1,7 @@
 
 import EVMRevert from '../../helpers/EVMRevert';
-var Message = artifacts.require('MessageHelper.sol');
-var ERC827TokenMock = artifacts.require('ERC827TokenMock.sol');
+var Message = artifacts.require('MessageHelper');
+var ERC827TokenMock = artifacts.require('ERC827TokenMock');
 
 var BigNumber = web3.BigNumber;
 var _ = require('lodash');

+ 1 - 1
test/token/MintableToken.test.js

@@ -1,6 +1,6 @@
 
 import expectThrow from '../helpers/expectThrow';
-var MintableToken = artifacts.require('../contracts/Tokens/MintableToken.sol');
+var MintableToken = artifacts.require('MintableToken');
 
 contract('Mintable', function (accounts) {
   let token;

+ 1 - 1
test/token/PausableToken.test.js

@@ -1,7 +1,7 @@
 'user strict';
 
 import assertRevert from '../helpers/assertRevert';
-var PausableTokenMock = artifacts.require('./mocks/PausableTokenMock.sol');
+var PausableTokenMock = artifacts.require('PausableTokenMock');
 
 contract('PausableToken', function (accounts) {
   let token;

+ 1 - 1
test/token/StandardToken.test.js

@@ -1,7 +1,7 @@
 
 import assertRevert from '../helpers/assertRevert';
 
-var StandardTokenMock = artifacts.require('mocks/StandardTokenMock.sol');
+var StandardTokenMock = artifacts.require('StandardTokenMock');
 
 contract('StandardToken', function (accounts) {
   let token;