From 48badda96f933aea76d163be8c6b86969b0254c7 Mon Sep 17 00:00:00 2001 From: Makoto Inoue Date: Sat, 22 Oct 2016 18:29:07 +0100 Subject: [PATCH] Fix typo --- contracts/bounties/SimpleTokenBounty.sol | 8 ++++---- contracts/test-helpers/InsecureTargetMock.sol | 2 +- contracts/test-helpers/SecureTargetMock.sol | 2 +- test/Bounty.js | 8 ++++---- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/contracts/bounties/SimpleTokenBounty.sol b/contracts/bounties/SimpleTokenBounty.sol index 9aeb6a7d9..42b65eb36 100644 --- a/contracts/bounties/SimpleTokenBounty.sol +++ b/contracts/bounties/SimpleTokenBounty.sol @@ -9,7 +9,7 @@ import '../PullPayment.sol'; */ contract Target { - function checkInvarient() returns(bool); + function checkInvariant() returns(bool); } contract Bounty is PullPayment { @@ -27,15 +27,15 @@ contract Bounty is PullPayment { return target; } - function checkInvarient() returns(bool){ - return target.checkInvarient(); + function checkInvariant() returns(bool){ + return target.checkInvariant(); } function claim(Target target) { address researcher = researchers[target]; if (researcher == 0) throw; // Check Target contract invariants - if (!target.checkInvarient()) { + if (!target.checkInvariant()) { throw; } asyncSend(researcher, this.balance); diff --git a/contracts/test-helpers/InsecureTargetMock.sol b/contracts/test-helpers/InsecureTargetMock.sol index 101d371e9..2918361a8 100644 --- a/contracts/test-helpers/InsecureTargetMock.sol +++ b/contracts/test-helpers/InsecureTargetMock.sol @@ -1,7 +1,7 @@ pragma solidity ^0.4.0; contract InsecureTargetMock { - function checkInvarient() returns(bool){ + function checkInvariant() returns(bool){ return false; } } diff --git a/contracts/test-helpers/SecureTargetMock.sol b/contracts/test-helpers/SecureTargetMock.sol index 67e599018..bd3a7dae2 100644 --- a/contracts/test-helpers/SecureTargetMock.sol +++ b/contracts/test-helpers/SecureTargetMock.sol @@ -1,7 +1,7 @@ pragma solidity ^0.4.0; contract SecureTargetMock { - function checkInvarient() returns(bool){ + function checkInvariant() returns(bool){ return true; } } diff --git a/test/Bounty.js b/test/Bounty.js index bb731b8ec..68b567a8d 100644 --- a/test/Bounty.js +++ b/test/Bounty.js @@ -1,10 +1,10 @@ contract('Bounty', function(accounts) { - it("can call checkInvarient for InsecureTargetMock", function(done){ + it("can call checkInvariant for InsecureTargetMock", function(done){ var bounty = Bounty.deployed(); var target = SecureTargetMock.deployed(); bounty.createTarget(target.address). then(function() { - return bounty.checkInvarient.call() + return bounty.checkInvariant.call() }). then(function(result) { assert.isTrue(result); @@ -12,12 +12,12 @@ contract('Bounty', function(accounts) { then(done); }) - it("can call checkInvarient for InsecureTargetMock", function(done){ + it("can call checkInvariant for InsecureTargetMock", function(done){ var bounty = Bounty.deployed(); var target = InsecureTargetMock.deployed(); bounty.createTarget(target.address). then(function() { - return bounty.checkInvarient.call() + return bounty.checkInvariant.call() }). then(function(result) { assert.isFalse(result);