aboutsummaryrefslogtreecommitdiffstats
path: root/test/compilationTests/zeppelin
diff options
context:
space:
mode:
Diffstat (limited to 'test/compilationTests/zeppelin')
-rw-r--r--test/compilationTests/zeppelin/Bounty.sol6
-rw-r--r--test/compilationTests/zeppelin/DayLimit.sol2
-rw-r--r--test/compilationTests/zeppelin/LimitBalance.sol2
-rw-r--r--test/compilationTests/zeppelin/MultisigWallet.sol4
-rw-r--r--test/compilationTests/zeppelin/ReentrancyGuard.sol2
-rw-r--r--test/compilationTests/zeppelin/lifecycle/Pausable.sol4
-rw-r--r--test/compilationTests/zeppelin/ownership/Claimable.sol2
-rw-r--r--test/compilationTests/zeppelin/ownership/DelayedClaimable.sol4
-rw-r--r--test/compilationTests/zeppelin/ownership/HasNoEther.sol4
-rw-r--r--test/compilationTests/zeppelin/ownership/HasNoTokens.sol2
-rw-r--r--test/compilationTests/zeppelin/ownership/Ownable.sol2
-rw-r--r--test/compilationTests/zeppelin/ownership/Shareable.sol6
-rw-r--r--test/compilationTests/zeppelin/payment/PullPayment.sol6
-rw-r--r--test/compilationTests/zeppelin/token/LimitedTransferToken.sol2
-rw-r--r--test/compilationTests/zeppelin/token/MintableToken.sol2
-rw-r--r--test/compilationTests/zeppelin/token/StandardToken.sol4
-rw-r--r--test/compilationTests/zeppelin/token/VestedToken.sol8
17 files changed, 31 insertions, 31 deletions
diff --git a/test/compilationTests/zeppelin/Bounty.sol b/test/compilationTests/zeppelin/Bounty.sol
index a5e75cd3..55e64071 100644
--- a/test/compilationTests/zeppelin/Bounty.sol
+++ b/test/compilationTests/zeppelin/Bounty.sol
@@ -20,7 +20,7 @@ contract Bounty is PullPayment, Destructible {
*/
function() external payable {
if (claimed) {
- throw;
+ revert();
}
}
@@ -49,11 +49,11 @@ contract Bounty is PullPayment, Destructible {
function claim(Target target) public {
address researcher = researchers[target];
if (researcher == address(0)) {
- throw;
+ revert();
}
// Check Target contract invariants
if (target.checkInvariant()) {
- throw;
+ revert();
}
asyncSend(researcher, address(this).balance);
claimed = true;
diff --git a/test/compilationTests/zeppelin/DayLimit.sol b/test/compilationTests/zeppelin/DayLimit.sol
index 5a2937b5..bc576c89 100644
--- a/test/compilationTests/zeppelin/DayLimit.sol
+++ b/test/compilationTests/zeppelin/DayLimit.sol
@@ -68,7 +68,7 @@ contract DayLimit {
*/
modifier limitedDaily(uint256 _value) {
if (!underLimit(_value)) {
- throw;
+ revert();
}
_;
}
diff --git a/test/compilationTests/zeppelin/LimitBalance.sol b/test/compilationTests/zeppelin/LimitBalance.sol
index 9682ff1c..8bf4b253 100644
--- a/test/compilationTests/zeppelin/LimitBalance.sol
+++ b/test/compilationTests/zeppelin/LimitBalance.sol
@@ -24,7 +24,7 @@ contract LimitBalance {
*/
modifier limitedPayable() {
if (address(this).balance > limit) {
- throw;
+ revert();
}
_;
diff --git a/test/compilationTests/zeppelin/MultisigWallet.sol b/test/compilationTests/zeppelin/MultisigWallet.sol
index 2d6a064a..3793428d 100644
--- a/test/compilationTests/zeppelin/MultisigWallet.sol
+++ b/test/compilationTests/zeppelin/MultisigWallet.sol
@@ -61,7 +61,7 @@ contract MultisigWallet is Multisig, Shareable, DayLimit {
emit SingleTransact(msg.sender, _value, _to, _data);
// yes - just execute the call.
if (!_to.call.value(_value)(_data)) {
- throw;
+ revert();
}
return 0;
}
@@ -83,7 +83,7 @@ contract MultisigWallet is Multisig, Shareable, DayLimit {
function confirm(bytes32 _h) onlymanyowners(_h) public returns (bool) {
if (txs[_h].to != address(0)) {
if (!txs[_h].to.call.value(txs[_h].value)(txs[_h].data)) {
- throw;
+ revert();
}
emit MultiTransact(msg.sender, _h, txs[_h].value, txs[_h].to, txs[_h].data);
delete txs[_h];
diff --git a/test/compilationTests/zeppelin/ReentrancyGuard.sol b/test/compilationTests/zeppelin/ReentrancyGuard.sol
index 60c7927b..7805ec07 100644
--- a/test/compilationTests/zeppelin/ReentrancyGuard.sol
+++ b/test/compilationTests/zeppelin/ReentrancyGuard.sol
@@ -27,7 +27,7 @@ contract ReentrancyGuard {
_;
rentrancy_lock = false;
} else {
- throw;
+ revert();
}
}
diff --git a/test/compilationTests/zeppelin/lifecycle/Pausable.sol b/test/compilationTests/zeppelin/lifecycle/Pausable.sol
index 4ffd281a..0c48f2f6 100644
--- a/test/compilationTests/zeppelin/lifecycle/Pausable.sol
+++ b/test/compilationTests/zeppelin/lifecycle/Pausable.sol
@@ -19,7 +19,7 @@ contract Pausable is Ownable {
* @dev modifier to allow actions only when the contract IS paused
*/
modifier whenNotPaused() {
- if (paused) throw;
+ if (paused) revert();
_;
}
@@ -27,7 +27,7 @@ contract Pausable is Ownable {
* @dev modifier to allow actions only when the contract IS NOT paused
*/
modifier whenPaused {
- if (!paused) throw;
+ if (!paused) revert();
_;
}
diff --git a/test/compilationTests/zeppelin/ownership/Claimable.sol b/test/compilationTests/zeppelin/ownership/Claimable.sol
index 72390411..d7b48a29 100644
--- a/test/compilationTests/zeppelin/ownership/Claimable.sol
+++ b/test/compilationTests/zeppelin/ownership/Claimable.sol
@@ -17,7 +17,7 @@ contract Claimable is Ownable {
*/
modifier onlyPendingOwner() {
if (msg.sender != pendingOwner) {
- throw;
+ revert();
}
_;
}
diff --git a/test/compilationTests/zeppelin/ownership/DelayedClaimable.sol b/test/compilationTests/zeppelin/ownership/DelayedClaimable.sol
index f019d2f1..540a2ce0 100644
--- a/test/compilationTests/zeppelin/ownership/DelayedClaimable.sol
+++ b/test/compilationTests/zeppelin/ownership/DelayedClaimable.sol
@@ -22,7 +22,7 @@ contract DelayedClaimable is Claimable {
*/
function setLimits(uint256 _start, uint256 _end) public onlyOwner {
if (_start > _end)
- throw;
+ revert();
end = _end;
start = _start;
}
@@ -34,7 +34,7 @@ contract DelayedClaimable is Claimable {
*/
function claimOwnership() public onlyPendingOwner {
if ((block.number > end) || (block.number < start))
- throw;
+ revert();
owner = pendingOwner;
pendingOwner = address(0x0);
end = 0;
diff --git a/test/compilationTests/zeppelin/ownership/HasNoEther.sol b/test/compilationTests/zeppelin/ownership/HasNoEther.sol
index 9f294679..75d90841 100644
--- a/test/compilationTests/zeppelin/ownership/HasNoEther.sol
+++ b/test/compilationTests/zeppelin/ownership/HasNoEther.sol
@@ -23,7 +23,7 @@ contract HasNoEther is Ownable {
*/
constructor() public payable {
if(msg.value > 0) {
- throw;
+ revert();
}
}
@@ -38,7 +38,7 @@ contract HasNoEther is Ownable {
*/
function reclaimEther() external onlyOwner {
if(!owner.send(address(this).balance)) {
- throw;
+ revert();
}
}
}
diff --git a/test/compilationTests/zeppelin/ownership/HasNoTokens.sol b/test/compilationTests/zeppelin/ownership/HasNoTokens.sol
index d1dc4b3e..df4284f1 100644
--- a/test/compilationTests/zeppelin/ownership/HasNoTokens.sol
+++ b/test/compilationTests/zeppelin/ownership/HasNoTokens.sol
@@ -19,7 +19,7 @@ contract HasNoTokens is Ownable {
* @param data_ Bytes The data passed from the caller.
*/
function tokenFallback(address from_, uint256 value_, bytes data_) external {
- throw;
+ revert();
}
/**
diff --git a/test/compilationTests/zeppelin/ownership/Ownable.sol b/test/compilationTests/zeppelin/ownership/Ownable.sol
index 7417b2bd..a862cb74 100644
--- a/test/compilationTests/zeppelin/ownership/Ownable.sol
+++ b/test/compilationTests/zeppelin/ownership/Ownable.sol
@@ -24,7 +24,7 @@ contract Ownable {
*/
modifier onlyOwner() {
if (msg.sender != owner) {
- throw;
+ revert();
}
_;
}
diff --git a/test/compilationTests/zeppelin/ownership/Shareable.sol b/test/compilationTests/zeppelin/ownership/Shareable.sol
index 4a6b32f0..0c8d16a5 100644
--- a/test/compilationTests/zeppelin/ownership/Shareable.sol
+++ b/test/compilationTests/zeppelin/ownership/Shareable.sol
@@ -37,7 +37,7 @@ contract Shareable {
// simple single-sig function modifier.
modifier onlyOwner {
if (!isOwner(msg.sender)) {
- throw;
+ revert();
}
_;
}
@@ -68,7 +68,7 @@ contract Shareable {
}
required = _required;
if (required > owners.length) {
- throw;
+ revert();
}
}
@@ -139,7 +139,7 @@ contract Shareable {
uint256 index = ownerIndex[msg.sender];
// make sure they're an owner
if (index == 0) {
- throw;
+ revert();
}
PendingState memory pending = pendings[_operation];
diff --git a/test/compilationTests/zeppelin/payment/PullPayment.sol b/test/compilationTests/zeppelin/payment/PullPayment.sol
index 2f3e1b51..bac1d019 100644
--- a/test/compilationTests/zeppelin/payment/PullPayment.sol
+++ b/test/compilationTests/zeppelin/payment/PullPayment.sol
@@ -33,18 +33,18 @@ contract PullPayment {
uint256 payment = payments[payee];
if (payment == 0) {
- throw;
+ revert();
}
if (address(this).balance < payment) {
- throw;
+ revert();
}
totalPayments = totalPayments.sub(payment);
payments[payee] = 0;
if (!payee.send(payment)) {
- throw;
+ revert();
}
}
}
diff --git a/test/compilationTests/zeppelin/token/LimitedTransferToken.sol b/test/compilationTests/zeppelin/token/LimitedTransferToken.sol
index 052c28e6..3ce928f6 100644
--- a/test/compilationTests/zeppelin/token/LimitedTransferToken.sol
+++ b/test/compilationTests/zeppelin/token/LimitedTransferToken.sol
@@ -23,7 +23,7 @@ contract LimitedTransferToken is ERC20 {
* @dev Checks whether it can transfer or otherwise throws.
*/
modifier canTransfer(address _sender, uint256 _value) {
- if (_value > transferableTokens(_sender, uint64(now))) throw;
+ if (_value > transferableTokens(_sender, uint64(now))) revert();
_;
}
diff --git a/test/compilationTests/zeppelin/token/MintableToken.sol b/test/compilationTests/zeppelin/token/MintableToken.sol
index f99964d0..24b8c807 100644
--- a/test/compilationTests/zeppelin/token/MintableToken.sol
+++ b/test/compilationTests/zeppelin/token/MintableToken.sol
@@ -21,7 +21,7 @@ contract MintableToken is StandardToken, Ownable {
modifier canMint() {
- if(mintingFinished) throw;
+ if(mintingFinished) revert();
_;
}
diff --git a/test/compilationTests/zeppelin/token/StandardToken.sol b/test/compilationTests/zeppelin/token/StandardToken.sol
index 94b12e57..56f4a5f3 100644
--- a/test/compilationTests/zeppelin/token/StandardToken.sol
+++ b/test/compilationTests/zeppelin/token/StandardToken.sol
@@ -27,7 +27,7 @@ contract StandardToken is ERC20, BasicToken {
uint256 _allowance = allowed[_from][msg.sender];
// Check is not needed because sub(_allowance, _value) will already throw if this condition is not met
- // if (_value > _allowance) throw;
+ // if (_value > _allowance) revert();
balances[_to] = balances[_to].add(_value);
balances[_from] = balances[_from].sub(_value);
@@ -46,7 +46,7 @@ contract StandardToken is ERC20, BasicToken {
// allowance to zero by calling `approve(_spender, 0)` if it is not
// already 0 to mitigate the race condition described here:
// https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
- if ((_value != 0) && (allowed[msg.sender][_spender] != 0)) throw;
+ if ((_value != 0) && (allowed[msg.sender][_spender] != 0)) revert();
allowed[msg.sender][_spender] = _value;
emit Approval(msg.sender, _spender, _value);
diff --git a/test/compilationTests/zeppelin/token/VestedToken.sol b/test/compilationTests/zeppelin/token/VestedToken.sol
index 2ee2713d..ca13b638 100644
--- a/test/compilationTests/zeppelin/token/VestedToken.sol
+++ b/test/compilationTests/zeppelin/token/VestedToken.sol
@@ -46,10 +46,10 @@ contract VestedToken is StandardToken, LimitedTransferToken {
// Check for date inconsistencies that may cause unexpected behavior
if (_cliff < _start || _vesting < _cliff) {
- throw;
+ revert();
}
- if (tokenGrantsCount(_to) > MAX_GRANTS_PER_ADDRESS) throw; // To prevent a user being spammed and have his balance locked (out of gas attack when calculating vesting).
+ if (tokenGrantsCount(_to) > MAX_GRANTS_PER_ADDRESS) revert(); // To prevent a user being spammed and have his balance locked (out of gas attack when calculating vesting).
uint256 count = grants[_to].push(
TokenGrant(
@@ -77,11 +77,11 @@ contract VestedToken is StandardToken, LimitedTransferToken {
TokenGrant storage grant = grants[_holder][_grantId];
if (!grant.revokable) { // Check if grant was revokable
- throw;
+ revert();
}
if (grant.granter != msg.sender) { // Only granter can revoke it
- throw;
+ revert();
}
address receiver = grant.burnsOnRevoke ? 0xdead : msg.sender;