Skip to content

Commit 7ffccb0

Browse files
author
Brandon Iles
committed
Compiler version to recommended 0.6.11
1 parent 6e5f8fb commit 7ffccb0

File tree

6 files changed

+41
-33
lines changed

6 files changed

+41
-33
lines changed

contracts/Forth.sol

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
pragma solidity ^0.5.16;
1+
// SPDX-License-Identifier: BSD-3-Clause
2+
3+
pragma solidity 0.6.11;
24
pragma experimental ABIEncoderV2;
35

46
import "./SafeMath.sol";
@@ -28,10 +30,10 @@ contract Forth {
2830
/// @notice Cap on the percentage of totalSupply that can be minted at each mint
2931
uint8 public constant mintCap = 2;
3032

31-
/// @notice Allowance amounts on behalf of others
33+
/// @dev Allowance amounts on behalf of others
3234
mapping (address => mapping (address => uint96)) internal allowances;
3335

34-
/// @notice Official record of token balances for each account
36+
/// @dev Official record of token balances for each account
3537
mapping (address => uint96) internal balances;
3638

3739
/// @notice A record of each accounts delegate

contracts/GovernorAlpha.sol

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
pragma solidity ^0.5.16;
1+
// SPDX-License-Identifier: BSD-3-Clause
2+
3+
pragma solidity 0.6.11;
24
pragma experimental ABIEncoderV2;
35

46
contract GovernorAlpha {
@@ -30,58 +32,58 @@ contract GovernorAlpha {
3032
uint public proposalCount;
3133

3234
struct Proposal {
33-
/// @notice Unique id for looking up a proposal
35+
// Unique id for looking up a proposal
3436
uint id;
3537

36-
/// @notice Creator of the proposal
38+
// Creator of the proposal
3739
address proposer;
3840

39-
/// @notice The timestamp that the proposal will be available for execution, set once the vote succeeds
41+
// The timestamp that the proposal will be available for execution, set once the vote succeeds
4042
uint eta;
4143

42-
/// @notice the ordered list of target addresses for calls to be made
44+
// The ordered list of target addresses for calls to be made
4345
address[] targets;
4446

45-
/// @notice The ordered list of values (i.e. msg.value) to be passed to the calls to be made
47+
// The ordered list of values (i.e. msg.value) to be passed to the calls to be made
4648
uint[] values;
4749

48-
/// @notice The ordered list of function signatures to be called
50+
// The ordered list of function signatures to be called
4951
string[] signatures;
5052

51-
/// @notice The ordered list of calldata to be passed to each call
53+
// The ordered list of calldata to be passed to each call
5254
bytes[] calldatas;
5355

54-
/// @notice The block at which voting begins: holders must delegate their votes prior to this block
56+
// The block at which voting begins: holders must delegate their votes prior to this block
5557
uint startBlock;
5658

57-
/// @notice The block at which voting ends: votes must be cast prior to this block
59+
// The block at which voting ends: votes must be cast prior to this block
5860
uint endBlock;
5961

60-
/// @notice Current number of votes in favor of this proposal
62+
// Current number of votes in favor of this proposal
6163
uint forVotes;
6264

63-
/// @notice Current number of votes in opposition to this proposal
65+
// Current number of votes in opposition to this proposal
6466
uint againstVotes;
6567

66-
/// @notice Flag marking whether the proposal has been canceled
68+
// Flag marking whether the proposal has been canceled
6769
bool canceled;
6870

69-
/// @notice Flag marking whether the proposal has been executed
71+
// Flag marking whether the proposal has been executed
7072
bool executed;
7173

72-
/// @notice Receipts of ballots for the entire set of voters
74+
// Receipts of ballots for the entire set of voters
7375
mapping (address => Receipt) receipts;
7476
}
7577

7678
/// @notice Ballot receipt record for a voter
7779
struct Receipt {
78-
/// @notice Whether or not a vote has been cast
80+
// Whether or not a vote has been cast
7981
bool hasVoted;
8082

81-
/// @notice Whether or not the voter supports the proposal
83+
// Whether or not the voter supports the proposal
8284
bool support;
8385

84-
/// @notice The number of votes the voter had, which were cast
86+
// The number of votes the voter had, which were cast
8587
uint96 votes;
8688
}
8789

@@ -190,7 +192,7 @@ contract GovernorAlpha {
190192
Proposal storage proposal = proposals[proposalId];
191193
proposal.executed = true;
192194
for (uint i = 0; i < proposal.targets.length; i++) {
193-
timelock.executeTransaction.value(proposal.values[i])(proposal.targets[i], proposal.values[i], proposal.signatures[i], proposal.calldatas[i], proposal.eta);
195+
timelock.executeTransaction{value: proposal.values[i]}(proposal.targets[i], proposal.values[i], proposal.signatures[i], proposal.calldatas[i], proposal.eta);
194196
}
195197
emit ProposalExecuted(proposalId);
196198
}

contracts/SafeMath.sol

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
pragma solidity ^0.5.16;
1+
// SPDX-License-Identifier: MIT
2+
3+
pragma solidity 0.6.11;
24

35
// From https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/math/Math.sol
46
// Subject to the MIT license.
@@ -183,4 +185,4 @@ library SafeMath {
183185
require(b != 0, errorMessage);
184186
return a % b;
185187
}
186-
}
188+
}

contracts/Timelock.sol

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
pragma solidity ^0.5.16;
1+
// SPDX-License-Identifier: BSD-3-Clause
2+
3+
pragma solidity ^0.6.11;
24

35
import "./SafeMath.sol";
46

@@ -31,7 +33,7 @@ contract Timelock {
3133
delay = delay_;
3234
}
3335

34-
function() external payable { }
36+
receive() external payable { }
3537

3638
function setDelay(uint delay_) public {
3739
require(msg.sender == address(this), "Timelock::setDelay: Call must come from Timelock.");
@@ -96,7 +98,7 @@ contract Timelock {
9698
}
9799

98100
// solium-disable-next-line security/no-call-value
99-
(bool success, bytes memory returnData) = target.call.value(value)(callData);
101+
(bool success, bytes memory returnData) = target.call{value: value}(callData);
100102
require(success, "Timelock::executeTransaction: Transaction execution reverted.");
101103

102104
emit ExecuteTransaction(txHash, target, value, signature, data, eta);
@@ -108,4 +110,4 @@ contract Timelock {
108110
// solium-disable-next-line security/no-block-members
109111
return block.timestamp;
110112
}
111-
}
113+
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"mocha": "^8.1.3",
2525
"prettier": "^2.1.1",
2626
"rimraf": "^3.0.2",
27-
"solc": "0.5.16",
27+
"solc": "0.6.11",
2828
"ts-node": "^9.0.0",
2929
"typescript": "^4.0.2"
3030
}

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6641,10 +6641,10 @@ snapdragon@^0.8.1:
66416641
source-map-resolve "^0.5.0"
66426642
use "^3.1.0"
66436643

6644-
solc@0.5.16:
6645-
version "0.5.16"
6646-
resolved "https://registry.yarnpkg.com/solc/-/solc-0.5.16.tgz#6c8d710a3792ccc79db924606b558a1149b1c603"
6647-
integrity sha512-weEtRtisJyf+8UjELs7S4ST1KK7UIq6SRB7tpprfJBL9b5mTrZAT7m4gJKi2h6MiBpuSWfnraK8BnkyWzuTMRA==
6644+
solc@0.6.11:
6645+
version "0.6.11"
6646+
resolved "https://registry.yarnpkg.com/solc/-/solc-0.6.11.tgz#3205b13c8162a02c5d8f1d85ff267889a5095467"
6647+
integrity sha512-qMe8epy45eMzXZ9IGDk986NGjakC5/s+yPGuO99YsDaJQitxDAd3rIItlzxgfEvjr0xNJ3IaqGAGvvJ0/59nfA==
66486648
dependencies:
66496649
command-exists "^1.2.8"
66506650
commander "3.0.2"

0 commit comments

Comments
 (0)