Skip to content

Commit 08a9c59

Browse files
authored
Merge pull request #316 from CJ42/refactor/constructor
refactor: remove `public` visibility from `constructor`s + add thousand separators to thousand numbers
2 parents 53d30dc + ecc612a commit 08a9c59

File tree

7 files changed

+10
-10
lines changed

7 files changed

+10
-10
lines changed

program-analysis/echidna/exercises/exercise1/solution.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ import "./token.sol";
1111
contract TestToken is Token {
1212
address echidna = msg.sender;
1313

14-
constructor() public {
15-
balances[echidna] = 10000;
14+
constructor() {
15+
balances[echidna] = 10_000;
1616
}
1717

1818
function echidna_test_balance() public view returns (bool) {

program-analysis/echidna/exercises/exercise1/template.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ import "./token.sol";
1111
contract TestToken is Token {
1212
address echidna = tx.origin;
1313

14-
constructor() public {
15-
balances[echidna] = 10000;
14+
constructor() {
15+
balances[echidna] = 10_000;
1616
}
1717

1818
function echidna_test_balance() public view returns (bool) {

program-analysis/echidna/exercises/exercise2/solution.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import "./token.sol";
99
/// echidna program-analysis/echidna/exercises/exercise1/solution.sol
1010
/// ```
1111
contract TestToken is Token {
12-
constructor() public {
12+
constructor() {
1313
pause(); // pause the contract
1414
owner = address(0); // lose ownership
1515
}

program-analysis/echidna/exercises/exercise2/template.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import "./token.sol";
99
/// echidna program-analysis/echidna/exercises/exercise2/template.sol
1010
/// ```
1111
contract TestToken is Token {
12-
constructor() public {
12+
constructor() {
1313
pause(); // pause the contract
1414
owner = address(0); // lose ownership
1515
}

program-analysis/echidna/exercises/exercise3/mintable.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ contract MintableToken is Token {
77
int256 public totalMinted;
88
int256 public totalMintable;
99

10-
constructor(int256 totalMintable_) public {
10+
constructor(int256 totalMintable_) {
1111
totalMintable = totalMintable_;
1212
}
1313

program-analysis/echidna/exercises/exercise3/solution.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ import "./mintable.sol";
1111
contract TestToken is MintableToken {
1212
address echidna = msg.sender;
1313

14-
constructor() public MintableToken(10000) {
14+
constructor() MintableToken(10_000) {
1515
owner = echidna;
1616
}
1717

1818
function echidna_test_balance() public view returns (bool) {
19-
return balances[msg.sender] <= 10000;
19+
return balances[msg.sender] <= 10_000;
2020
}
2121
}

program-analysis/echidna/exercises/exercise3/template.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ contract TestToken is MintableToken {
1212
address echidna = msg.sender;
1313

1414
// TODO: update the constructor
15-
constructor(int256 totalMintable) public MintableToken(totalMintable) {}
15+
constructor(int256 totalMintable) MintableToken(totalMintable) {}
1616

1717
function echidna_test_balance() public view returns (bool) {
1818
// TODO: add the property

0 commit comments

Comments
 (0)