Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

10.1: assignment and solution mismatch #62

Open
jacob-thrackle opened this issue Sep 27, 2022 · 1 comment
Open

10.1: assignment and solution mismatch #62

jacob-thrackle opened this issue Sep 27, 2022 · 1 comment

Comments

@jacob-thrackle
Copy link

The assignment for 10.1 and the solution are mismatched.

  1. Create a public uint called oneGWei and set it to 1 gwei.
  2. Create a public bool called isOneGWei and set it to the result of a comparison operation between 1 gwei and 10^9.

Answer:

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.3;

contract EtherUnits {
    uint public oneWei = 1 wei;
    // 1 wei is equal to 1
    bool public isOneWei = 1 wei == 1;

    uint public oneEther = 1 ether;
    // 1 ether is equal to 10^18 wei
    bool public isOneEther = 1 ether == 1e18;

    // these fail 
    // uint public oneGWei = 1 gwei;
    // bool public isOneGWei = 1 gwei == 1e9;

    uint public oneGwei = 1 gwei;
    bool public isOneGwei = 1 gwei == 1e9;
}

Notice that the prompt has a capital "W" in the variable names while the answer that passes the checks does not.

@bunsenstraat
Copy link
Owner

this issue would belong in the repo that the tutorial is in. maybe the ethereum/remix-workshops?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants