diff --git a/contracts/MultisigWallet.sol b/contracts/MultisigWallet.sol index 5aac8303c..80f39cc3b 100644 --- a/contracts/MultisigWallet.sol +++ b/contracts/MultisigWallet.sol @@ -13,6 +13,17 @@ import "./DayLimit.sol"; * Wallet(w).from(anotherOwner).confirm(h); */ contract MultisigWallet is Multisig, Shareable, DayLimit { + + struct Transaction { + address to; + uint value; + bytes data; + } + + function MultisigWallet(address[] _owners, uint _required, uint _daylimit) + Shareable(_owners, _required) + DayLimit(_daylimit) { } + // kills the contract sending everything to `_to`. function kill(address _to) onlymanyowners(sha3(msg.data)) external { suicide(_to); diff --git a/migrations/1_initial_migration.js b/migrations/1_initial_migration.js index 5b309e062..4d5f3f9b0 100644 --- a/migrations/1_initial_migration.js +++ b/migrations/1_initial_migration.js @@ -1,3 +1,5 @@ +var Migrations = artifacts.require("./Migrations.sol"); + module.exports = function(deployer) { deployer.deploy(Migrations); }; diff --git a/package.json b/package.json index ba6e5f71d..3e133a9a1 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,7 @@ "babel-preset-es2015": "^6.18.0", "babel-preset-stage-2": "^6.18.0", "babel-preset-stage-3": "^6.17.0", + "babel-register": "^6.23.0", "ethereumjs-testrpc": "^3.0.2", "truffle": "^3.1.1" }, diff --git a/scripts/test.sh b/scripts/test.sh index 74383d5ed..d211930eb 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -2,6 +2,6 @@ testrpc & trpc_pid=$! -node_modules/truffle/cli.js test +truffle test kill -9 $trpc_pid diff --git a/test/BasicToken.js b/test/BasicToken.js index 7516e2737..7ee9915ba 100644 --- a/test/BasicToken.js +++ b/test/BasicToken.js @@ -1,5 +1,7 @@ const assertJump = require('./helpers/assertJump'); +var BasicTokenMock = artifacts.require("./helpers/BasicTokenMock.sol"); + contract('BasicToken', function(accounts) { it("should return the correct totalSupply after construction", async function() { diff --git a/test/VestedToken.js b/test/VestedToken.js index ebd6a587d..bc6333503 100644 --- a/test/VestedToken.js +++ b/test/VestedToken.js @@ -1,5 +1,6 @@ const assertJump = require('./helpers/assertJump'); const timer = require('./helpers/timer'); +var VestedTokenMock = artifacts.require("./helpers/VestedTokenMock.sol"); contract('VestedToken', function(accounts) { let token = null diff --git a/contracts/test-helpers/BasicTokenMock.sol b/test/helpers/BasicTokenMock.sol similarity index 84% rename from contracts/test-helpers/BasicTokenMock.sol rename to test/helpers/BasicTokenMock.sol index 5b6447c8a..15be1a898 100644 --- a/contracts/test-helpers/BasicTokenMock.sol +++ b/test/helpers/BasicTokenMock.sol @@ -1,7 +1,7 @@ pragma solidity ^0.4.4; -import '../token/BasicToken.sol'; +import '../../contracts/token/BasicToken.sol'; // mock class using BasicToken diff --git a/contracts/test-helpers/DayLimitMock.sol b/test/helpers/DayLimitMock.sol similarity index 91% rename from contracts/test-helpers/DayLimitMock.sol rename to test/helpers/DayLimitMock.sol index 0ba5ca23f..338eea900 100644 --- a/contracts/test-helpers/DayLimitMock.sol +++ b/test/helpers/DayLimitMock.sol @@ -1,5 +1,5 @@ pragma solidity ^0.4.4; -import "../DayLimit.sol"; +import "../../contracts/DayLimit.sol"; contract DayLimitMock is DayLimit { uint public totalSpending; diff --git a/contracts/test-helpers/InsecureTargetBounty.sol b/test/helpers/InsecureTargetBounty.sol similarity index 82% rename from contracts/test-helpers/InsecureTargetBounty.sol rename to test/helpers/InsecureTargetBounty.sol index 83db61b92..1779884ae 100644 --- a/contracts/test-helpers/InsecureTargetBounty.sol +++ b/test/helpers/InsecureTargetBounty.sol @@ -1,7 +1,7 @@ pragma solidity ^0.4.4; -import {Bounty, Target} from "../Bounty.sol"; +import {Bounty, Target} from "../../contracts/Bounty.sol"; contract InsecureTargetMock is Target { diff --git a/contracts/test-helpers/LimitBalanceMock.sol b/test/helpers/LimitBalanceMock.sol similarity index 80% rename from contracts/test-helpers/LimitBalanceMock.sol rename to test/helpers/LimitBalanceMock.sol index bcb862ef9..c579f731a 100644 --- a/contracts/test-helpers/LimitBalanceMock.sol +++ b/test/helpers/LimitBalanceMock.sol @@ -1,7 +1,7 @@ pragma solidity ^0.4.4; -import '../LimitBalance.sol'; +import '../../contracts/LimitBalance.sol'; // mock class using LimitBalance diff --git a/contracts/test-helpers/MultisigWalletMock.sol b/test/helpers/MultisigWalletMock.sol similarity index 87% rename from contracts/test-helpers/MultisigWalletMock.sol rename to test/helpers/MultisigWalletMock.sol index 19adc558d..ef663ce21 100644 --- a/contracts/test-helpers/MultisigWalletMock.sol +++ b/test/helpers/MultisigWalletMock.sol @@ -1,5 +1,5 @@ pragma solidity ^0.4.4; -import "../MultisigWallet.sol"; +import "../../contracts/MultisigWallet.sol"; contract MultisigWalletMock is MultisigWallet { uint public totalSpending; diff --git a/contracts/test-helpers/PausableMock.sol b/test/helpers/PausableMock.sol similarity index 89% rename from contracts/test-helpers/PausableMock.sol rename to test/helpers/PausableMock.sol index 267bff841..316eaacbd 100644 --- a/contracts/test-helpers/PausableMock.sol +++ b/test/helpers/PausableMock.sol @@ -1,7 +1,7 @@ pragma solidity ^0.4.4; -import '../lifecycle/Pausable.sol'; +import '../../contracts/lifecycle/Pausable.sol'; // mock class using Pausable diff --git a/contracts/test-helpers/PullPaymentMock.sol b/test/helpers/PullPaymentMock.sol similarity index 84% rename from contracts/test-helpers/PullPaymentMock.sol rename to test/helpers/PullPaymentMock.sol index 223f8d0d1..e10b27397 100644 --- a/contracts/test-helpers/PullPaymentMock.sol +++ b/test/helpers/PullPaymentMock.sol @@ -1,7 +1,7 @@ pragma solidity ^0.4.4; -import '../payment/PullPayment.sol'; +import '../../contracts/payment/PullPayment.sol'; // mock class using PullPayment diff --git a/contracts/test-helpers/SafeMathMock.sol b/test/helpers/SafeMathMock.sol similarity index 88% rename from contracts/test-helpers/SafeMathMock.sol rename to test/helpers/SafeMathMock.sol index 430343b81..46d782a4f 100644 --- a/contracts/test-helpers/SafeMathMock.sol +++ b/test/helpers/SafeMathMock.sol @@ -1,7 +1,7 @@ pragma solidity ^0.4.4; -import '../SafeMath.sol'; +import '../../contracts/SafeMath.sol'; contract SafeMathMock is SafeMath { diff --git a/contracts/test-helpers/SecureTargetBounty.sol b/test/helpers/SecureTargetBounty.sol similarity index 82% rename from contracts/test-helpers/SecureTargetBounty.sol rename to test/helpers/SecureTargetBounty.sol index 022edcc6f..50488a354 100644 --- a/contracts/test-helpers/SecureTargetBounty.sol +++ b/test/helpers/SecureTargetBounty.sol @@ -1,7 +1,7 @@ pragma solidity ^0.4.4; -import {Bounty, Target} from "../Bounty.sol"; +import {Bounty, Target} from "../../contracts/Bounty.sol"; contract SecureTargetMock is Target { diff --git a/contracts/test-helpers/ShareableMock.sol b/test/helpers/ShareableMock.sol similarity index 85% rename from contracts/test-helpers/ShareableMock.sol rename to test/helpers/ShareableMock.sol index 0d30958af..1899bbe1d 100644 --- a/contracts/test-helpers/ShareableMock.sol +++ b/test/helpers/ShareableMock.sol @@ -1,5 +1,5 @@ pragma solidity ^0.4.4; -import "../ownership/Shareable.sol"; +import "../../contracts/ownership/Shareable.sol"; contract ShareableMock is Shareable { diff --git a/contracts/test-helpers/StandardTokenMock.sol b/test/helpers/StandardTokenMock.sol similarity index 84% rename from contracts/test-helpers/StandardTokenMock.sol rename to test/helpers/StandardTokenMock.sol index 1e6741f24..9a05a6859 100644 --- a/contracts/test-helpers/StandardTokenMock.sol +++ b/test/helpers/StandardTokenMock.sol @@ -1,7 +1,7 @@ pragma solidity ^0.4.4; -import '../token/StandardToken.sol'; +import '../../contracts/token/StandardToken.sol'; // mock class using StandardToken diff --git a/contracts/test-helpers/VestedTokenMock.sol b/test/helpers/VestedTokenMock.sol similarity index 84% rename from contracts/test-helpers/VestedTokenMock.sol rename to test/helpers/VestedTokenMock.sol index 01ff87dd9..af6ceef5b 100644 --- a/contracts/test-helpers/VestedTokenMock.sol +++ b/test/helpers/VestedTokenMock.sol @@ -1,6 +1,6 @@ pragma solidity ^0.4.4; -import '../token/VestedToken.sol'; +import '../../contracts/token/VestedToken.sol'; // mock class using StandardToken contract VestedTokenMock is VestedToken { diff --git a/truffle.js b/truffle.js index 11afd3012..f7215a966 100644 --- a/truffle.js +++ b/truffle.js @@ -1,3 +1,6 @@ +require('babel-register'); +require('babel-polyfill'); + module.exports = { networks: { development: {