Skip to content

Commit 1a8faed

Browse files
committed
warnings
1 parent 6018d13 commit 1a8faed

3 files changed

Lines changed: 6 additions & 5 deletions

File tree

contracts/script/HelperConfig.s.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// SPDX-License-Identifier: MIT
22
pragma solidity ^0.8.19;
33

4-
import "forge-std/Script.sol";
4+
import "lib/forge-std/src/Script.sol";
55

66
contract HelperConfig is Script {
77
struct NetworkConfig {

contracts/src/Attacker.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ contract Attacker {
99

1010
event LogFallback();
1111

12-
constructor(Lottery _l) public {
12+
constructor(Lottery _l) {
1313
l = Lottery(_l);
1414
owner = msg.sender;
1515
}

contracts/src/Lottery.sol

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ contract Oracle{
88
seed = _seed;
99
}
1010

11-
function getRandomNumber() external returns (uint256){
11+
function getRandomNumber() external view returns (uint256){
1212
return block.number % seed;
1313
}
1414

@@ -90,8 +90,8 @@ contract Lottery {
9090

9191
// register a team
9292
function registerTeam(address _walletAddress,string calldata _teamName, string calldata _password) external payable {
93-
// 2 ether deposit to register a team
94-
require(msg.value == 2 ether);
93+
// 0.2 ether deposit to register a team
94+
require(msg.value == 0.2 ether);
9595
// add to mapping as well as another array
9696
teams[_walletAddress] = Team(_teamName, _password, 5);
9797
teamAddresses.push(_walletAddress);
@@ -129,6 +129,7 @@ contract Lottery {
129129
return sent;
130130
}
131131
}
132+
return true;
132133
}
133134

134135
function getTeamCount() public view returns (uint256){

0 commit comments

Comments
 (0)