Skip to content
This repository has been archived by the owner on Jul 10, 2023. It is now read-only.

Decimals shadowing warning in contracts #62

Open
tkporter opened this issue Apr 11, 2023 · 2 comments · May be fixed by #63
Open

Decimals shadowing warning in contracts #62

tkporter opened this issue Apr 11, 2023 · 2 comments · May be fixed by #63

Comments

@tkporter
Copy link
Contributor

Seeing this when building the monorepo, probably worth fixing:

➤ YN0000: [@hyperlane-xyz/hyperlane-token]: Generating typings for: 8 artifacts in dir: ./src/types for target: ethers-v5
➤ YN0000: [@hyperlane-xyz/hyperlane-token]: Successfully generated 80 typings!
➤ YN0000: [@hyperlane-xyz/hyperlane-token]: Compiled 8 Solidity files successfully
➤ YN0000: [@hyperlane-xyz/hyperlane-token]: Solidity 0.8.16 is not fully supported yet. You can still use Hardhat, but some features, like stack traces, might not work correctly.
➤ YN0000: [@hyperlane-xyz/hyperlane-token]:
➤ YN0000: [@hyperlane-xyz/hyperlane-token]: Learn more at https://hardhat.org/reference/solidity-support
➤ YN0000: [@hyperlane-xyz/hyperlane-token]:
➤ YN0000: [@hyperlane-xyz/hyperlane-token]: Warning: This declaration shadows an existing declaration.
➤ YN0000: [@hyperlane-xyz/hyperlane-token]:   --> contracts/HypERC20.sol:16:17:
➤ YN0000: [@hyperlane-xyz/hyperlane-token]:    |
➤ YN0000: [@hyperlane-xyz/hyperlane-token]: 16 |     constructor(uint8 decimals) {
➤ YN0000: [@hyperlane-xyz/hyperlane-token]:    |                 ^^^^^^^^^^^^^^
➤ YN0000: [@hyperlane-xyz/hyperlane-token]: Note: The shadowed declaration is here:
➤ YN0000: [@hyperlane-xyz/hyperlane-token]:   --> contracts/HypERC20.sol:46:5:
➤ YN0000: [@hyperlane-xyz/hyperlane-token]:    |
➤ YN0000: [@hyperlane-xyz/hyperlane-token]: 46 |     function decimals() public view override returns (uint8) {
➤ YN0000: [@hyperlane-xyz/hyperlane-token]:    |     ^ (Relevant source part starts here and spans across multiple lines).
➤ YN0000: [@hyperlane-xyz/hyperlane-token]:
➤ YN0000: [@hyperlane-xyz/hyperlane-token]:
➤ YN0000: [@hyperlane-xyz/hyperlane-token]: Process exited (exit code 0), completed in 13s 613ms
@tkporter
Copy link
Contributor Author

cc @yorhodes

@yorhodes
Copy link
Member

woops

@yorhodes yorhodes linked a pull request Apr 11, 2023 that will close this issue
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants