cleanup contents and update solc
This commit is contained in:
parent
6750c665e8
commit
37135766e7
|
@ -6,6 +6,8 @@ __pycache__/
|
||||||
# embark
|
# embark
|
||||||
.embark/
|
.embark/
|
||||||
chains.json
|
chains.json
|
||||||
|
config/production/password
|
||||||
|
config/livenet/password
|
||||||
|
|
||||||
# egg-related
|
# egg-related
|
||||||
viper.egg-info/
|
viper.egg-info/
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
"default": {
|
"default": {
|
||||||
"versions": {
|
"versions": {
|
||||||
"web3.js": "1.0.0-beta",
|
"web3.js": "1.0.0-beta",
|
||||||
"solc": "0.4.21"
|
"solc": "0.4.23"
|
||||||
},
|
},
|
||||||
"deployment": {
|
"deployment": {
|
||||||
"host": "localhost",
|
"host": "localhost",
|
||||||
|
@ -15,55 +15,6 @@
|
||||||
],
|
],
|
||||||
"gas": "auto",
|
"gas": "auto",
|
||||||
"contracts": {
|
"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 {
|
contract Controlled {
|
||||||
/// @notice The address of the controller is the only address that can call
|
/// @notice The address of the controller is the only address that can call
|
||||||
|
@ -10,7 +10,7 @@ contract Controlled {
|
||||||
|
|
||||||
address public controller;
|
address public controller;
|
||||||
|
|
||||||
function Controlled() public {
|
constructor() public {
|
||||||
controller = msg.sender;
|
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
|
/// @dev `Owned` is a base level contract that assigns an `owner` that can be
|
||||||
/// later changed
|
/// later changed
|
||||||
|
@ -14,7 +14,7 @@ contract Owned {
|
||||||
address public owner;
|
address public owner;
|
||||||
|
|
||||||
/// @notice The Constructor assigns the message sender to be `owner`
|
/// @notice The Constructor assigns the message sender to be `owner`
|
||||||
function Owned() public {
|
constructor() public {
|
||||||
owner = msg.sender;
|
owner = msg.sender;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
pragma solidity ^0.4.21;
|
pragma solidity ^0.4.23;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Math operations with safety checks
|
* 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
|
// Abstract contract for the full ERC 20 Token standard
|
||||||
// https://github.com/ethereum/EIPs/issues/20
|
// https://github.com/ethereum/EIPs/issues/20
|
||||||
|
@ -16,16 +16,18 @@ contract ERC20Token {
|
||||||
/// total amount of tokens
|
/// total amount of tokens
|
||||||
uint256 public totalSupply;
|
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`
|
/// @notice send `_value` token to `_to` from `msg.sender`
|
||||||
/// @param _to The address of the recipient
|
/// @param _to The address of the recipient
|
||||||
/// @param _value The amount of token to be transferred
|
/// @param _value The amount of token to be transferred
|
||||||
/// @return Whether the transfer was successful or not
|
/// @return Whether the transfer was successful or not
|
||||||
function transfer(address _to, uint256 _value) public returns (bool success);
|
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`
|
/// @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from`
|
||||||
/// @param _from The address of the sender
|
/// @param _from The address of the sender
|
||||||
/// @param _to The address of the recipient
|
/// @param _to The address of the recipient
|
||||||
|
@ -33,16 +35,14 @@ contract ERC20Token {
|
||||||
/// @return Whether the transfer was successful or not
|
/// @return Whether the transfer was successful or not
|
||||||
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success);
|
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success);
|
||||||
|
|
||||||
/// @notice `msg.sender` approves `_spender` to spend `_value` tokens
|
/// @param _owner The address from which the balance will be retrieved
|
||||||
/// @param _spender The address of the account able to transfer the tokens
|
/// @return The balance
|
||||||
/// @param _value The amount of tokens to be approved for transfer
|
function balanceOf(address _owner) public view returns (uint256 balance);
|
||||||
/// @return Whether the approval was successful or not
|
|
||||||
function approve(address _spender, uint256 _value) public returns (bool success);
|
|
||||||
|
|
||||||
/// @param _owner The address of the account owning tokens
|
/// @param _owner The address of the account owning tokens
|
||||||
/// @param _spender The address of the account able to transfer the tokens
|
/// @param _spender The address of the account able to transfer the tokens
|
||||||
/// @return Amount of remaining tokens allowed to spent
|
/// @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 Transfer(address indexed _from, address indexed _to, uint256 _value);
|
||||||
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
|
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
|
||||||
|
|
|
@ -1,56 +1,84 @@
|
||||||
/*
|
pragma solidity ^0.4.23;
|
||||||
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;
|
|
||||||
|
|
||||||
import "./ERC20Token.sol";
|
import "./ERC20Token.sol";
|
||||||
|
|
||||||
contract StandardToken is ERC20Token {
|
contract StandardToken is ERC20Token {
|
||||||
|
|
||||||
function transfer(address _to, uint256 _value) returns (bool success) {
|
mapping (address => uint256) balances;
|
||||||
//Default assumes totalSupply can't be over max (2^256 - 1).
|
mapping (address => mapping (address => uint256)) allowed;
|
||||||
//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.
|
constructor() internal { }
|
||||||
//if (balances[msg.sender] >= _value && balances[_to] + _value > balances[_to]) {
|
|
||||||
if (balances[msg.sender] >= _value && _value > 0) {
|
function transfer(
|
||||||
balances[msg.sender] -= _value;
|
address _to,
|
||||||
balances[_to] += _value;
|
uint256 _value
|
||||||
Transfer(msg.sender, _to, _value);
|
)
|
||||||
return true;
|
public
|
||||||
} else { return false; }
|
returns (bool success)
|
||||||
|
{
|
||||||
|
return transfer(msg.sender, _to, _value);
|
||||||
}
|
}
|
||||||
|
|
||||||
function transferFrom(address _from, address _to, uint256 _value) returns (bool success) {
|
function approve(address _spender, uint256 _value)
|
||||||
//same as above. Replace this line with the following if you want to protect against wrapping uints.
|
public
|
||||||
//if (balances[_from] >= _value && allowed[_from][msg.sender] >= _value && balances[_to] + _value > balances[_to]) {
|
returns (bool success)
|
||||||
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) {
|
|
||||||
allowed[msg.sender][_spender] = _value;
|
allowed[msg.sender][_spender] = _value;
|
||||||
Approval(msg.sender, _spender, _value);
|
emit Approval(msg.sender, _spender, _value);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function allowance(address _owner, address _spender) constant returns (uint256 remaining) {
|
function transferFrom(
|
||||||
return allowed[_owner][_spender];
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mapping (address => uint256) balances;
|
function allowance(address _owner, address _spender)
|
||||||
mapping (address => mapping (address => uint256)) allowed;
|
public
|
||||||
|
view
|
||||||
|
returns (uint256 remaining)
|
||||||
|
{
|
||||||
|
return allowed[_owner][_spender];
|
||||||
|
}
|
||||||
|
|
||||||
|
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": {
|
"plugins": {
|
||||||
},
|
},
|
||||||
"versions": {
|
"versions": {
|
||||||
"solc": "0.4.21"
|
"solc": "0.4.23"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,20 +9,19 @@
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "git+https://github.com/status-im/contracts.git"
|
"url": "git+https://github.com/status-im/contracts.git"
|
||||||
},
|
},
|
||||||
"author": "",
|
"author": "Status Research & Development GMBH",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://github.com/status-im/contracts/issues"
|
"url": "https://github.com/status-im/contracts/issues"
|
||||||
},
|
},
|
||||||
"homepage": "https://github.com/status-im/contracts#readme",
|
"homepage": "https://github.com/status-im/contracts#readme",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"solidity-coverage": "^0.4.4",
|
"solidity-coverage": "^0.5.0",
|
||||||
"elliptic": "^6.4.0"
|
"elliptic": "^6.4.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"elliptic-curve": "^0.1.0",
|
|
||||||
"embark": "^2.7.0",
|
"embark": "^2.7.0",
|
||||||
"ethereumjs-util": "^5.1.5",
|
"elliptic-curve": "^0.1.0",
|
||||||
"solidity-coverage": "^0.4.4"
|
"ethereumjs-util": "^5.1.5"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue