Уважаемые пользователи Голос!
Сайт доступен в режиме «чтение» до сентября 2020 года. Операции с токенами Golos, Cyber можно проводить, используя альтернативные клиенты или через эксплорер Cyberway. Подробности здесь: https://golos.io/@goloscore/operacii-s-tokenami-golos-cyber-1594822432061
С уважением, команда “Голос”
GOLOS
RU
EN
UA
sergi.pantoja
4 года назад
cryptocurrency

Common errors you may have while writing smart contracts with Solidity

If you are writing an smart contract you absolutely don't want to have any errors in it that might compromise your project. Here I'll introduce some of the most common mistakes people make while coding with Solidity.

  • Syntax errors
    Like all programing languages, syntax errors are common mistakes, specially for programers inexperienced in that particular language. You will get the hang of it if you practice enough. Example: missing a semi-colon.
  • No defining a function's type
    All functions need a type to determine their scope and what they can manipulate and have access to. The type of a function can be either view, pure or payable.
  • No defining a function as internal or external
    Internal functions can only be called within the smart contract they are defined in, while external functions can be called from other smart contracts and through web3 calls.
  • Not returning the correct type for a function
  • Not providing a reference type for arguments or variables in a function
    This types can be either memory, callable or storage.
cryptocurrencysmartcontractprogramingsolidity
2
48.319 GOLOS
На Golos с October 2019
Комментарии (0)
Сортировать по:
Сначала старые