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

Useful Quickfixes that are missing #356

Open
jthoene opened this issue Sep 7, 2020 · 0 comments
Open

Useful Quickfixes that are missing #356

jthoene opened this issue Sep 7, 2020 · 0 comments
Assignees

Comments

@jthoene
Copy link
Collaborator

jthoene commented Sep 7, 2020

  • msg.gas -> gasleft() : msg.gas has been deprecated in favor of gasleft()
  • change type "address" of variable to "address payable" if the "send" or "transfer" function is used for this variable: "send" and "transfer" are only available for objects of type "address payable", not "address".
  • make function payable for the following compiler error: "msg.value" and "callvalue()" can only be used in payable public functions. Make the function "payable" or use an internal function to avoid this error.
  • Add datalocation for return parameters: Data location must be "memory" or "calldata" for return parameter in function, but none was given.
  • Add datalocation for variables: Data location must be "storage", "memory" or "calldata" for variable, but none was given. - Change "block.blockhash()" to "blockhash()": "block.blockhash()" has been deprecated in favor of "blockhash()"
  • Make contract abstract: Contract "xxxx" should be marked as abstract.
  • Mark function as virtual: Functions without implementation must be marked virtual.
  • Add override keyword for functions, which override a method: Overriding function is missing "override" specifier.
@jthoene jthoene self-assigned this Sep 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant