Updates solc-js test to 0.6.0.

This commit is contained in:
Erik Kundt 2019-09-25 16:00:26 +02:00
parent 8adde5abbe
commit e4f0414391
2 changed files with 10 additions and 10 deletions

View File

@ -295,7 +295,7 @@ contract DAOInterface {
/// @notice Send `_amount` tokens to `_to` from `msg.sender`. Prior to this /// @notice Send `_amount` tokens to `_to` from `msg.sender`. Prior to this
/// getMyReward() is called. /// getMyReward() is called.
/// @param _to The address of the recipient /// @param _to The address of the recipient
/// @param _amount The amount of tokens to be transfered /// @param _amount The amount of tokens to be transferred
/// @return Whether the transfer was successful or not /// @return Whether the transfer was successful or not
function transferWithoutReward(address _to, uint256 _amount) public returns (bool success); function transferWithoutReward(address _to, uint256 _amount) public returns (bool success);
@ -303,7 +303,7 @@ contract DAOInterface {
/// is approved by `_from`. Prior to this getMyReward() is called. /// is approved by `_from`. Prior to this getMyReward() is called.
/// @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
/// @param _amount The amount of tokens to be transfered /// @param _amount The amount of tokens to be transferred
/// @return Whether the transfer was successful or not /// @return Whether the transfer was successful or not
function transferFromWithoutReward( function transferFromWithoutReward(
address payable _from, address payable _from,
@ -383,7 +383,7 @@ contract DAO is DAOInterface, Token, TokenCreation {
revert(); revert();
lastTimeMinQuorumMet = now; lastTimeMinQuorumMet = now;
minQuorumDivisor = 5; // sets the minimal quorum to 20% minQuorumDivisor = 5; // sets the minimal quorum to 20%
proposals.length = 1; // avoids a proposal with ID 0 because it is used proposals.push(); // avoids a proposal with ID 0 because it is used
allowedRecipients[address(this)] = true; allowedRecipients[address(this)] = true;
allowedRecipients[curator] = true; allowedRecipients[curator] = true;
@ -447,8 +447,8 @@ contract DAO is DAOInterface, Token, TokenCreation {
if (proposals.length == 1) // initial length is 1 (see constructor) if (proposals.length == 1) // initial length is 1 (see constructor)
lastTimeMinQuorumMet = now; lastTimeMinQuorumMet = now;
_proposalID = proposals.length++; Proposal storage p = proposals.push();
Proposal storage p = proposals[_proposalID]; _proposalID = proposals.length - 1;
p.recipient = _recipient; p.recipient = _recipient;
p.amount = _amount; p.amount = _amount;
p.description = _description; p.description = _description;
@ -458,7 +458,7 @@ contract DAO is DAOInterface, Token, TokenCreation {
//p.proposalPassed = False; // that's default //p.proposalPassed = False; // that's default
p.newCurator = _newCurator; p.newCurator = _newCurator;
if (_newCurator) if (_newCurator)
p.splitData.length++; p.splitData.push();
p.creator = msg.sender; p.creator = msg.sender;
p.proposalDeposit = msg.value; p.proposalDeposit = msg.value;

View File

@ -34,7 +34,7 @@ contract TokenInterface {
mapping (address => uint256) balances; mapping (address => uint256) balances;
mapping (address => mapping (address => uint256)) allowed; mapping (address => mapping (address => uint256)) allowed;
/// Public variables of the token, all used for display /// Public variables of the token, all used for display
string public name; string public name;
string public symbol; string public symbol;
uint8 public decimals; uint8 public decimals;
@ -85,7 +85,7 @@ contract TokenInterface {
); );
} }
contract tokenRecipient { contract tokenRecipient {
function receiveApproval(address _from, uint256 _value, address _token, bytes memory _extraData) public; function receiveApproval(address _from, uint256 _value, address _token, bytes memory _extraData) public;
} }
@ -134,8 +134,8 @@ contract Token is TokenInterface {
emit Approval(msg.sender, _spender, _amount); emit Approval(msg.sender, _spender, _amount);
return true; return true;
} }
/// Allow another contract to spend some tokens in your behalf /// Allow another contract to spend some tokens in your behalf
function approveAndCall(address _spender, uint256 _value, bytes memory _extraData) function approveAndCall(address _spender, uint256 _value, bytes memory _extraData)
public returns (bool success) { public returns (bool success) {
allowed[msg.sender][_spender] = _value; allowed[msg.sender][_spender] = _value;