Skip to content

Commit

Permalink
Merge pull request #334 from OpenZeppelin/upgrade/truffle-3.4.6
Browse files Browse the repository at this point in the history
Upgrade truffle to 3.4.6
  • Loading branch information
frangio authored Jul 26, 2017
2 parents 93fb8f3 + 5e7c168 commit 91e5a92
Show file tree
Hide file tree
Showing 5 changed files with 97 additions and 3,107 deletions.
4 changes: 2 additions & 2 deletions contracts/token/VestedToken.sol
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ contract VestedToken is StandardToken, LimitedTransferToken {
* @param _grantId The id of the token grant.
*/
function revokeTokenGrant(address _holder, uint256 _grantId) public {
TokenGrant grant = grants[_holder][_grantId];
TokenGrant storage grant = grants[_holder][_grantId];

require(grant.revokable);
require(grant.granter == msg.sender); // Only granter can revoke it
Expand Down Expand Up @@ -186,7 +186,7 @@ contract VestedToken is StandardToken, LimitedTransferToken {
* revokability, burnsOnRevoke, and vesting) plus the vested value at the current time.
*/
function tokenGrant(address _holder, uint256 _grantId) constant returns (address granter, uint256 value, uint256 vested, uint64 start, uint64 cliff, uint64 vesting, bool revokable, bool burnsOnRevoke) {
TokenGrant grant = grants[_holder][_grantId];
TokenGrant storage grant = grants[_holder][_grantId];

granter = grant.granter;
value = grant.value;
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"babel-preset-stage-2": "^6.18.0",
"babel-preset-stage-3": "^6.17.0",
"babel-register": "^6.23.0",
"babel-polyfill": "^6.23.0",
"chai": "^4.0.2",
"chai-as-promised": "^7.0.0",
"chai-bignumber": "^2.0.0",
Expand All @@ -43,6 +44,6 @@
"mocha-lcov-reporter": "^1.3.0",
"moment": "^2.18.1",
"solidity-coverage": "^0.1.7",
"truffle": "3.2.2"
"truffle": "^3.4.6"
}
}
2 changes: 1 addition & 1 deletion test/Crowdsale.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ contract('Crowdsale', function ([_, investor, wallet, purchaser]) {

it('should reject payments before start', async function () {
await this.crowdsale.send(value).should.be.rejectedWith(EVMThrow)
await this.crowdsale.buyTokens(investor, value, {from: purchaser}).should.be.rejectedWith(EVMThrow)
await this.crowdsale.buyTokens(investor, {from: purchaser, value: value}).should.be.rejectedWith(EVMThrow)
})

it('should accept payments after start', async function () {
Expand Down
4 changes: 2 additions & 2 deletions test/DayLimit.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ contract('DayLimit', function(accounts) {
beforeEach( async function() {
dayLimit = await DayLimitMock.new(initLimit);
});

it('should construct with the passed daily limit', async function() {
let dailyLimit = await dayLimit.dailyLimit();
assert.equal(initLimit, dailyLimit);
Expand Down Expand Up @@ -76,7 +76,7 @@ contract('DayLimit', function(accounts) {
spentToday = await dayLimit.spentToday();
assert.equal(spentToday, 8);

await dayLimit.resetSpentToday(15);
await dayLimit.resetSpentToday();
await dayLimit.attemptSpend(3);
spentToday = await dayLimit.spentToday();
assert.equal(spentToday, 3);
Expand Down
Loading

0 comments on commit 91e5a92

Please sign in to comment.