cleanup contents and update solc
This commit is contained in:
parent
6750c665e8
commit
37135766e7
|
@ -6,6 +6,8 @@ __pycache__/
|
|||
# embark
|
||||
.embark/
|
||||
chains.json
|
||||
config/production/password
|
||||
config/livenet/password
|
||||
|
||||
# egg-related
|
||||
viper.egg-info/
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"default": {
|
||||
"versions": {
|
||||
"web3.js": "1.0.0-beta",
|
||||
"solc": "0.4.21"
|
||||
"solc": "0.4.23"
|
||||
},
|
||||
"deployment": {
|
||||
"host": "localhost",
|
||||
|
@ -15,55 +15,6 @@
|
|||
],
|
||||
"gas": "auto",
|
||||
"contracts": {
|
||||
"Bounty": {"deploy": false},
|
||||
"BountyFactory": {"deploy": false},
|
||||
"BountyKernel": {"deploy": false},
|
||||
"BountyManager": {"deploy": false},
|
||||
"BountyManagerFactory": {"deploy": false},
|
||||
"BountyManagerKernel": {"deploy": false},
|
||||
"BountyManagerPreSigned": {"deploy": false},
|
||||
"Controlled": { "deploy": false },
|
||||
"ContributionWallet": {"deploy": false},
|
||||
"DelayedUpdatableInstance": { "deploy": false },
|
||||
"DelayedUpdatableInstanceStorage": { "deploy": false },
|
||||
"DelegatedCall": { "deploy": false },
|
||||
"DelegationProxy": {"deploy": false},
|
||||
"DelegationProxyInterface": {"deploy": false},
|
||||
"DelegationProxyKernel": {"deploy": false},
|
||||
"DelegationProxyFactory": {"deploy": false},
|
||||
"Democracy": {"deploy": false},
|
||||
"DemocracyStorage": {"deploy": false},
|
||||
"DevTokensHolder": {"deploy": false},
|
||||
"DynamicCeiling": {"deploy": false},
|
||||
"EmojiBoard": {"deploy": false},
|
||||
"EmojiTable": {"deploy": false},
|
||||
"ERC725": { "deploy": false },
|
||||
"ERC735": { "deploy": false },
|
||||
"Factory": { "deploy": false },
|
||||
"FeeRecycler": {"deploy": false},
|
||||
"FriendsRecovery": { "deploy": false },
|
||||
"Identity": { "gas": 5000000 },
|
||||
"IdentityFactory": { "deploy": false },
|
||||
"IdentityKernel": { "gas": 5000000 },
|
||||
"Instance": { "deploy": false },
|
||||
"InstanceStorage": { "deploy": false },
|
||||
"MessageDeliveryPayout": {"deploy": false},
|
||||
"MiniMeToken": {"deploy": false},
|
||||
"MiniMeTokenFactory": {"deploy": false},
|
||||
"MultiSig": {"deploy": false},
|
||||
"Ownable": {"deploy": false},
|
||||
"Owned": {"deploy": false},
|
||||
"ProposalManager": {"deploy": false},
|
||||
"SGTExchanger": {"deploy": false},
|
||||
"SNT": {"deploy": false},
|
||||
"SNTPlaceHolder": {"deploy": false},
|
||||
"StandardToken": {"deploy": false},
|
||||
"StatusContribution": {"deploy": false},
|
||||
"TestContract": { "deploy": false },
|
||||
"TokenRegistry": {"deploy": false},
|
||||
"TrustNetwork": {"deploy": false},
|
||||
"UpdatableInstance": { "deploy": false },
|
||||
"UpdatedIdentityKernel": { "deploy": false }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
pragma solidity ^0.4.8;
|
||||
pragma solidity ^0.4.23;
|
||||
|
||||
contract Controlled {
|
||||
/// @notice The address of the controller is the only address that can call
|
||||
|
@ -10,7 +10,7 @@ contract Controlled {
|
|||
|
||||
address public controller;
|
||||
|
||||
function Controlled() public {
|
||||
constructor() public {
|
||||
controller = msg.sender;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
pragma solidity ^0.4.21;
|
||||
pragma solidity ^0.4.23;
|
||||
|
||||
/// @dev `Owned` is a base level contract that assigns an `owner` that can be
|
||||
/// later changed
|
||||
|
@ -14,7 +14,7 @@ contract Owned {
|
|||
address public owner;
|
||||
|
||||
/// @notice The Constructor assigns the message sender to be `owner`
|
||||
function Owned() public {
|
||||
constructor() public {
|
||||
owner = msg.sender;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
pragma solidity ^0.4.21;
|
||||
pragma solidity ^0.4.23;
|
||||
|
||||
/**
|
||||
* Math operations with safety checks
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
pragma solidity ^0.4.11;
|
||||
pragma solidity ^0.4.17;
|
||||
|
||||
// Abstract contract for the full ERC 20 Token standard
|
||||
// https://github.com/ethereum/EIPs/issues/20
|
||||
|
@ -16,16 +16,18 @@ contract ERC20Token {
|
|||
/// total amount of tokens
|
||||
uint256 public totalSupply;
|
||||
|
||||
/// @param _owner The address from which the balance will be retrieved
|
||||
/// @return The balance
|
||||
function balanceOf(address _owner) public constant returns (uint256 balance);
|
||||
|
||||
/// @notice send `_value` token to `_to` from `msg.sender`
|
||||
/// @param _to The address of the recipient
|
||||
/// @param _value The amount of token to be transferred
|
||||
/// @return Whether the transfer was successful or not
|
||||
function transfer(address _to, uint256 _value) public returns (bool success);
|
||||
|
||||
/// @notice `msg.sender` approves `_spender` to spend `_value` tokens
|
||||
/// @param _spender The address of the account able to transfer the tokens
|
||||
/// @param _value The amount of tokens to be approved for transfer
|
||||
/// @return Whether the approval was successful or not
|
||||
function approve(address _spender, uint256 _value) public returns (bool success);
|
||||
|
||||
/// @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from`
|
||||
/// @param _from The address of the sender
|
||||
/// @param _to The address of the recipient
|
||||
|
@ -33,16 +35,14 @@ contract ERC20Token {
|
|||
/// @return Whether the transfer was successful or not
|
||||
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success);
|
||||
|
||||
/// @notice `msg.sender` approves `_spender` to spend `_value` tokens
|
||||
/// @param _spender The address of the account able to transfer the tokens
|
||||
/// @param _value The amount of tokens to be approved for transfer
|
||||
/// @return Whether the approval was successful or not
|
||||
function approve(address _spender, uint256 _value) public returns (bool success);
|
||||
/// @param _owner The address from which the balance will be retrieved
|
||||
/// @return The balance
|
||||
function balanceOf(address _owner) public view returns (uint256 balance);
|
||||
|
||||
/// @param _owner The address of the account owning tokens
|
||||
/// @param _spender The address of the account able to transfer the tokens
|
||||
/// @return Amount of remaining tokens allowed to spent
|
||||
function allowance(address _owner, address _spender) public constant returns (uint256 remaining);
|
||||
function allowance(address _owner, address _spender) public view returns (uint256 remaining);
|
||||
|
||||
event Transfer(address indexed _from, address indexed _to, uint256 _value);
|
||||
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
|
||||
|
|
|
@ -1,56 +1,84 @@
|
|||
/*
|
||||
You should inherit from StandardToken or, for a token like you would want to
|
||||
deploy in something like Mist, see HumanStandardToken.sol.
|
||||
(This implements ONLY the standard functions and NOTHING else.
|
||||
If you deploy this, you won't have anything useful.)
|
||||
|
||||
Implements ERC 20 Token standard: https://github.com/ethereum/EIPs/issues/20
|
||||
.*/
|
||||
pragma solidity ^0.4.8;
|
||||
pragma solidity ^0.4.23;
|
||||
|
||||
import "./ERC20Token.sol";
|
||||
|
||||
contract StandardToken is ERC20Token {
|
||||
|
||||
function transfer(address _to, uint256 _value) returns (bool success) {
|
||||
//Default assumes totalSupply can't be over max (2^256 - 1).
|
||||
//If your token leaves out totalSupply and can issue more tokens as time goes on, you need to check if it doesn't wrap.
|
||||
//Replace the if with this one instead.
|
||||
//if (balances[msg.sender] >= _value && balances[_to] + _value > balances[_to]) {
|
||||
if (balances[msg.sender] >= _value && _value > 0) {
|
||||
balances[msg.sender] -= _value;
|
||||
balances[_to] += _value;
|
||||
Transfer(msg.sender, _to, _value);
|
||||
return true;
|
||||
} else { return false; }
|
||||
mapping (address => uint256) balances;
|
||||
mapping (address => mapping (address => uint256)) allowed;
|
||||
|
||||
constructor() internal { }
|
||||
|
||||
function transfer(
|
||||
address _to,
|
||||
uint256 _value
|
||||
)
|
||||
public
|
||||
returns (bool success)
|
||||
{
|
||||
return transfer(msg.sender, _to, _value);
|
||||
}
|
||||
|
||||
function transferFrom(address _from, address _to, uint256 _value) returns (bool success) {
|
||||
//same as above. Replace this line with the following if you want to protect against wrapping uints.
|
||||
//if (balances[_from] >= _value && allowed[_from][msg.sender] >= _value && balances[_to] + _value > balances[_to]) {
|
||||
if (balances[_from] >= _value && allowed[_from][msg.sender] >= _value && _value > 0) {
|
||||
balances[_to] += _value;
|
||||
balances[_from] -= _value;
|
||||
allowed[_from][msg.sender] -= _value;
|
||||
Transfer(_from, _to, _value);
|
||||
return true;
|
||||
} else { return false; }
|
||||
}
|
||||
|
||||
function balanceOf(address _owner) constant returns (uint256 balance) {
|
||||
return balances[_owner];
|
||||
}
|
||||
|
||||
function approve(address _spender, uint256 _value) returns (bool success) {
|
||||
function approve(address _spender, uint256 _value)
|
||||
public
|
||||
returns (bool success)
|
||||
{
|
||||
allowed[msg.sender][_spender] = _value;
|
||||
Approval(msg.sender, _spender, _value);
|
||||
emit Approval(msg.sender, _spender, _value);
|
||||
return true;
|
||||
}
|
||||
|
||||
function allowance(address _owner, address _spender) constant returns (uint256 remaining) {
|
||||
function transferFrom(
|
||||
address _from,
|
||||
address _to,
|
||||
uint256 _value
|
||||
)
|
||||
public
|
||||
returns (bool success)
|
||||
{
|
||||
if (balances[_from] >= _value &&
|
||||
allowed[_from][msg.sender] >= _value &&
|
||||
_value > 0) {
|
||||
allowed[_from][msg.sender] -= _value;
|
||||
return transfer(_from, _to, _value);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function allowance(address _owner, address _spender)
|
||||
public
|
||||
view
|
||||
returns (uint256 remaining)
|
||||
{
|
||||
return allowed[_owner][_spender];
|
||||
}
|
||||
|
||||
mapping (address => uint256) balances;
|
||||
mapping (address => mapping (address => uint256)) allowed;
|
||||
function balanceOf(address _owner)
|
||||
public
|
||||
view
|
||||
returns (uint256 balance)
|
||||
{
|
||||
return balances[_owner];
|
||||
}
|
||||
|
||||
function transfer(
|
||||
address _from,
|
||||
address _to,
|
||||
uint256 _value
|
||||
)
|
||||
internal
|
||||
returns (bool success)
|
||||
{
|
||||
if (balances[_from] >= _value && _value > 0) {
|
||||
balances[_from] -= _value;
|
||||
balances[_to] += _value;
|
||||
emit Transfer(_from, _to, _value);
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -5,6 +5,6 @@
|
|||
"plugins": {
|
||||
},
|
||||
"versions": {
|
||||
"solc": "0.4.21"
|
||||
"solc": "0.4.23"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,20 +9,19 @@
|
|||
"type": "git",
|
||||
"url": "git+https://github.com/status-im/contracts.git"
|
||||
},
|
||||
"author": "",
|
||||
"author": "Status Research & Development GMBH",
|
||||
"license": "ISC",
|
||||
"bugs": {
|
||||
"url": "https://github.com/status-im/contracts/issues"
|
||||
},
|
||||
"homepage": "https://github.com/status-im/contracts#readme",
|
||||
"devDependencies": {
|
||||
"solidity-coverage": "^0.4.4",
|
||||
"solidity-coverage": "^0.5.0",
|
||||
"elliptic": "^6.4.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"elliptic-curve": "^0.1.0",
|
||||
"embark": "^2.7.0",
|
||||
"ethereumjs-util": "^5.1.5",
|
||||
"solidity-coverage": "^0.4.4"
|
||||
"elliptic-curve": "^0.1.0",
|
||||
"ethereumjs-util": "^5.1.5"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue