Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions contracts/Bounty.sol
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ contract Bounty is PullPayment, Destructible {
* msg.sender as a researcher
* @return A target contract
*/
function createTarget() returns(Target) {
function createTarget() public returns(Target) {
Target target = Target(deployContract());
researchers[target] = msg.sender;
TargetCreated(target);
Expand All @@ -44,7 +44,7 @@ contract Bounty is PullPayment, Destructible {
* @dev Sends the contract funds to the researcher that proved the contract is broken.
* @param target contract
*/
function claim(Target target) {
function claim(Target target) public {
address researcher = researchers[target];
require(researcher != 0);
// Check Target contract invariants
Expand All @@ -68,5 +68,5 @@ contract Target {
* In order to win the bounty, security researchers will try to cause this broken state.
* @return True if all invariant values are correct, false otherwise.
*/
function checkInvariant() returns(bool);
function checkInvariant() public returns(bool);
}
2 changes: 1 addition & 1 deletion contracts/ECRecovery.sol
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ library ECRecovery {
* @param hash bytes32 message, the hash is the signed message. What is recovered is the signer address.
* @param sig bytes signature, the signature is generated using web3.eth.sign()
*/
function recover(bytes32 hash, bytes sig) constant returns (address) {
function recover(bytes32 hash, bytes sig) public constant returns (address) {
bytes32 r;
bytes32 s;
uint8 v;
Expand Down
2 changes: 1 addition & 1 deletion contracts/crowdsale/Crowdsale.sol
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ contract Crowdsale {
}

// low level token purchase function
function buyTokens(address beneficiary) payable {
function buyTokens(address beneficiary) public payable {
require(beneficiary != 0x0);
require(validPurchase());

Expand Down
2 changes: 1 addition & 1 deletion contracts/crowdsale/FinalizableCrowdsale.sol
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ contract FinalizableCrowdsale is Crowdsale, Ownable {
* @dev Must be called after crowdsale ends, to do some extra finalization
* work. Calls the contract's finalization function.
*/
function finalize() onlyOwner {
function finalize() onlyOwner public {
require(!isFinalized);
require(hasEnded());

Expand Down
8 changes: 4 additions & 4 deletions contracts/crowdsale/RefundVault.sol
Original file line number Diff line number Diff line change
Expand Up @@ -28,25 +28,25 @@ contract RefundVault is Ownable {
state = State.Active;
}

function deposit(address investor) onlyOwner payable {
function deposit(address investor) onlyOwner public payable {
require(state == State.Active);
deposited[investor] = deposited[investor].add(msg.value);
}

function close() onlyOwner {
function close() onlyOwner public {
require(state == State.Active);
state = State.Closed;
Closed();
wallet.transfer(this.balance);
}

function enableRefunds() onlyOwner {
function enableRefunds() onlyOwner public {
require(state == State.Active);
state = State.Refunding;
RefundsEnabled();
}

function refund(address investor) {
function refund(address investor) public {
require(state == State.Refunding);
uint256 depositedValue = deposited[investor];
deposited[investor] = 0;
Expand Down
2 changes: 1 addition & 1 deletion contracts/crowdsale/RefundableCrowdsale.sol
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ contract RefundableCrowdsale is FinalizableCrowdsale {
}

// if crowdsale is unsuccessful, investors can claim refunds here
function claimRefund() {
function claimRefund() public {
require(isFinalized);
require(!goalReached());

Expand Down
4 changes: 2 additions & 2 deletions contracts/lifecycle/Destructible.sol
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ contract Destructible is Ownable {
/**
* @dev Transfers the current balance to the owner and terminates the contract.
*/
function destroy() onlyOwner {
function destroy() onlyOwner public {
selfdestruct(owner);
}

function destroyAndSend(address _recipient) onlyOwner {
function destroyAndSend(address _recipient) onlyOwner public {
selfdestruct(_recipient);
}
}
4 changes: 2 additions & 2 deletions contracts/lifecycle/Migrations.sol
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ import '../ownership/Ownable.sol';
contract Migrations is Ownable {
uint256 public lastCompletedMigration;

function setCompleted(uint256 completed) onlyOwner {
function setCompleted(uint256 completed) onlyOwner public {
lastCompletedMigration = completed;
}

function upgrade(address newAddress) onlyOwner {
function upgrade(address newAddress) onlyOwner public {
Migrations upgraded = Migrations(newAddress);
upgraded.setCompleted(lastCompletedMigration);
}
Expand Down
4 changes: 2 additions & 2 deletions contracts/lifecycle/Pausable.sol
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ contract Pausable is Ownable {
/**
* @dev called by the owner to pause, triggers stopped state
*/
function pause() onlyOwner whenNotPaused {
function pause() onlyOwner whenNotPaused public {
paused = true;
Pause();
}

/**
* @dev called by the owner to unpause, returns to normal state
*/
function unpause() onlyOwner whenPaused {
function unpause() onlyOwner whenPaused public {
paused = false;
Unpause();
}
Expand Down
2 changes: 1 addition & 1 deletion contracts/lifecycle/TokenDestructible.sol
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ contract TokenDestructible is Ownable {
* @notice The called token contracts could try to re-enter this contract. Only
supply token contracts you trust.
*/
function destroy(address[] tokens) onlyOwner {
function destroy(address[] tokens) onlyOwner public {

// Transfer tokens to owner
for(uint256 i = 0; i < tokens.length; i++) {
Expand Down
4 changes: 2 additions & 2 deletions contracts/ownership/Claimable.sol
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ contract Claimable is Ownable {
* @dev Allows the current owner to set the pendingOwner address.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) onlyOwner {
function transferOwnership(address newOwner) onlyOwner public {
pendingOwner = newOwner;
}

/**
* @dev Allows the pendingOwner address to finalize the transfer.
*/
function claimOwnership() onlyPendingOwner {
function claimOwnership() onlyPendingOwner public {
OwnershipTransferred(owner, pendingOwner);
owner = pendingOwner;
pendingOwner = 0x0;
Expand Down
2 changes: 1 addition & 1 deletion contracts/ownership/Contactable.sol
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ contract Contactable is Ownable{
* @dev Allows the owner to set a string with their contact information.
* @param info The contact information to attach to the contract.
*/
function setContactInformation(string info) onlyOwner{
function setContactInformation(string info) onlyOwner public {
contactInformation = info;
}
}
4 changes: 2 additions & 2 deletions contracts/ownership/DelayedClaimable.sol
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ contract DelayedClaimable is Claimable {
* @param _start The earliest time ownership can be claimed.
* @param _end The latest time ownership can be claimed.
*/
function setLimits(uint256 _start, uint256 _end) onlyOwner {
function setLimits(uint256 _start, uint256 _end) onlyOwner public {
require(_start <= _end);
end = _end;
start = _start;
Expand All @@ -31,7 +31,7 @@ contract DelayedClaimable is Claimable {
* @dev Allows the pendingOwner address to finalize the transfer, as long as it is called within
* the specified start and end time.
*/
function claimOwnership() onlyPendingOwner {
function claimOwnership() onlyPendingOwner public {
require((block.number <= end) && (block.number >= start));
OwnershipTransferred(owner, pendingOwner);
owner = pendingOwner;
Expand Down
2 changes: 1 addition & 1 deletion contracts/ownership/Ownable.sol
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ contract Ownable {
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) onlyOwner {
function transferOwnership(address newOwner) onlyOwner public {
require(newOwner != address(0));
OwnershipTransferred(owner, newOwner);
owner = newOwner;
Expand Down
2 changes: 1 addition & 1 deletion contracts/payment/PullPayment.sol
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ contract PullPayment {
/**
* @dev withdraw accumulated balance, called by payee.
*/
function withdrawPayments() {
function withdrawPayments() public {
address payee = msg.sender;
uint256 payment = payments[payee];

Expand Down
4 changes: 2 additions & 2 deletions contracts/token/BasicToken.sol
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ contract BasicToken is ERC20Basic {
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/
function transfer(address _to, uint256 _value) returns (bool) {
function transfer(address _to, uint256 _value) public returns (bool) {
require(_to != address(0));

// SafeMath.sub will throw if there is not enough balance.
Expand All @@ -34,7 +34,7 @@ contract BasicToken is ERC20Basic {
* @param _owner The address to query the the balance of.
* @return An uint256 representing the amount owned by the passed address.
*/
function balanceOf(address _owner) constant returns (uint256 balance) {
function balanceOf(address _owner) public constant returns (uint256 balance) {
return balances[_owner];
}

Expand Down
6 changes: 3 additions & 3 deletions contracts/token/ERC20.sol
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import './ERC20Basic.sol';
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
contract ERC20 is ERC20Basic {
function allowance(address owner, address spender) constant returns (uint256);
function transferFrom(address from, address to, uint256 value) returns (bool);
function approve(address spender, uint256 value) returns (bool);
function allowance(address owner, address spender) public constant returns (uint256);
function transferFrom(address from, address to, uint256 value) public returns (bool);
function approve(address spender, uint256 value) public returns (bool);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
4 changes: 2 additions & 2 deletions contracts/token/ERC20Basic.sol
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ pragma solidity ^0.4.11;
*/
contract ERC20Basic {
uint256 public totalSupply;
function balanceOf(address who) constant returns (uint256);
function transfer(address to, uint256 value) returns (bool);
function balanceOf(address who) public constant returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
6 changes: 3 additions & 3 deletions contracts/token/LimitedTransferToken.sol
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ contract LimitedTransferToken is ERC20 {
* @param _to The address that will recieve the tokens.
* @param _value The amount of tokens to be transferred.
*/
function transfer(address _to, uint256 _value) canTransfer(msg.sender, _value) returns (bool) {
function transfer(address _to, uint256 _value) canTransfer(msg.sender, _value) public returns (bool) {
return super.transfer(_to, _value);
}

Expand All @@ -42,7 +42,7 @@ contract LimitedTransferToken is ERC20 {
* @param _to The address that will recieve the tokens.
* @param _value The amount of tokens to be transferred.
*/
function transferFrom(address _from, address _to, uint256 _value) canTransfer(_from, _value) returns (bool) {
function transferFrom(address _from, address _to, uint256 _value) canTransfer(_from, _value) public returns (bool) {
return super.transferFrom(_from, _to, _value);
}

Expand All @@ -51,7 +51,7 @@ contract LimitedTransferToken is ERC20 {
* @dev Overwriting transferableTokens(address holder, uint64 time) is the way to provide the
* specific logic for limiting token transferability for a holder over time.
*/
function transferableTokens(address holder, uint64 time) constant public returns (uint256) {
function transferableTokens(address holder, uint64 time) public constant returns (uint256) {
return balanceOf(holder);
}
}
4 changes: 2 additions & 2 deletions contracts/token/MintableToken.sol
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ contract MintableToken is StandardToken, Ownable {
* @param _amount The amount of tokens to mint.
* @return A boolean that indicates if the operation was successful.
*/
function mint(address _to, uint256 _amount) onlyOwner canMint returns (bool) {
function mint(address _to, uint256 _amount) onlyOwner canMint public returns (bool) {
totalSupply = totalSupply.add(_amount);
balances[_to] = balances[_to].add(_amount);
Mint(_to, _amount);
Expand All @@ -43,7 +43,7 @@ contract MintableToken is StandardToken, Ownable {
* @dev Function to stop minting new tokens.
* @return True if the operation was successful.
*/
function finishMinting() onlyOwner returns (bool) {
function finishMinting() onlyOwner public returns (bool) {
mintingFinished = true;
MintFinished();
return true;
Expand Down
4 changes: 2 additions & 2 deletions contracts/token/PausableToken.sol
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ import '../lifecycle/Pausable.sol';

contract PausableToken is StandardToken, Pausable {

function transfer(address _to, uint256 _value) whenNotPaused returns (bool) {
function transfer(address _to, uint256 _value) whenNotPaused public returns (bool) {
return super.transfer(_to, _value);
}

function transferFrom(address _from, address _to, uint256 _value) whenNotPaused returns (bool) {
function transferFrom(address _from, address _to, uint256 _value) whenNotPaused public returns (bool) {
return super.transferFrom(_from, _to, _value);
}
}
6 changes: 3 additions & 3 deletions contracts/token/StandardToken.sol
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ contract StandardToken is ERC20, BasicToken {
* @param _to address The address which you want to transfer to
* @param _value uint256 the amount of tokens to be transferred
*/
function transferFrom(address _from, address _to, uint256 _value) returns (bool) {
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
require(_to != address(0));

var _allowance = allowed[_from][msg.sender];
Expand All @@ -43,7 +43,7 @@ contract StandardToken is ERC20, BasicToken {
* @param _spender The address which will spend the funds.
* @param _value The amount of tokens to be spent.
*/
function approve(address _spender, uint256 _value) returns (bool) {
function approve(address _spender, uint256 _value) public returns (bool) {

// To change the approve amount you first have to reduce the addresses`
// allowance to zero by calling `approve(_spender, 0)` if it is not
Expand All @@ -62,7 +62,7 @@ contract StandardToken is ERC20, BasicToken {
* @param _spender address The address which will spend the funds.
* @return A uint256 specifying the amount of tokens still available for the spender.
*/
function allowance(address _owner, address _spender) constant returns (uint256 remaining) {
function allowance(address _owner, address _spender) public constant returns (uint256 remaining) {
return allowed[_owner][_spender];
}

Expand Down
10 changes: 5 additions & 5 deletions contracts/token/TokenTimelock.sol
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ contract TokenTimelock {
using SafeERC20 for ERC20Basic;

// ERC20 basic token contract being held
ERC20Basic token;
ERC20Basic public token;

// beneficiary of tokens after they are released
address beneficiary;
address public beneficiary;

// timestamp when token release is enabled
uint64 releaseTime;
uint64 public releaseTime;

function TokenTimelock(ERC20Basic _token, address _beneficiary, uint64 _releaseTime) {
require(_releaseTime > now);
Expand All @@ -32,15 +32,15 @@ contract TokenTimelock {
* @notice Transfers tokens held by timelock to beneficiary.
* Deprecated: please use TokenTimelock#release instead.
*/
function claim() {
function claim() public {
require(msg.sender == beneficiary);
release();
}

/**
* @notice Transfers tokens held by timelock to beneficiary.
*/
function release() {
function release() public {
require(now >= releaseTime);

uint256 amount = token.balanceOf(this);
Expand Down
Loading