cn someone help #3434
nzarambaelisa
started this conversation in
General
cn someone help
#3434
Replies: 4 comments 1 reply
-
@nzarambaelisa post the issue. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Iam just taking your class sir? Don't consider it
…On Sun, Oct 23, 2022, 2:29 PM Ali Murtaza ***@***.***> wrote:
@nzarambaelisa <https://github.com/nzarambaelisa> post the issue.
—
Reply to this email directly, view it on GitHub
<#3434 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AXF4747TRWLWDJ5D3UPTNEDWEUVSDANCNFSM6AAAAAARMGFD6I>
.
You are receiving this because you were mentioned.Message ID:
<smartcontractkit/full-blockchain-solidity-course-js/repo-discussions/3434/comments/3943520
@github.com>
|
Beta Was this translation helpful? Give feedback.
1 reply
-
What? |
Beta Was this translation helpful? Give feedback.
0 replies
-
@nzarambaelisa You missed semicolon after fund() in both receive() and fallback(). The correct implementation would be the following: /*
(your previous code)...
*/
receive() external payable {
fund();
}
fallback() external payable {
fund();
}
/*
(your following code)...
*/ This is the compilation error. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
***solidity
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.8;
import "./PriceConverter.sol";
error NotOwner();
//error NotEnough();
contract FundMe {
using PriceConverter for uint256;
address[] public funders;
mapping (address => uint256) public addresstoAmountFunded;
uint256 public constant MINIMUM_USD = 50 * 1e18;
address public immutable i_owner;
constructor(){
i_owner= msg.sender;
}
function fund() public payable {
require(msg.value.getConversionRate() >= MINIMUM_USD, "Didn't send enoung!");
//if (msg.value.getConversionRate() >= MINIMUM_USD) {revert NotEnough(); }
funders.push(msg.sender);
addresstoAmountFunded [msg.sender] = msg.value;
}
function withdraw() public onlyOwner{
}
modifier onlyOwner{
//require(msg.sender == i_owner, "Sender is not owner!");
if (msg.sender != i_owner) {revert NotOwner(); }
_;
}
receive() external payable {
fund()
}
fallback() external payable {
fund()
}
}
hi, I'm having issues here, cn someone help
Beta Was this translation helpful? Give feedback.
All reactions