Solidity-Jobs / S-Token

This is a Security Token!
0 stars 1 forks source link

SJSC06- Code Style (Informative) #12

Closed Reg0x closed 3 years ago

Reg0x commented 3 years ago

It has been possible to verify that, despite good quality code, there is a lack of order and structure that makes reading and analyzing the code difficult. This is a very common bad practice, especially in these types of projects that are continually changing and improving. This is not a vulnerability in itself, but it helps to improve the code and reduce the appearance of new vulnerabilities. Solidity Jobs Smart Contracts Audit As a reference, it is always recommendable to apply some coding style/good practices that can be found in multiple standards such as “Solidity Style Guide1”. These references are very useful to improve smart contract quality. Some of those practices are common and a popular accepted way to develop software. It is important to define a nomenclature of the files that allows us to easily identify the classes or contracts in our code. The case of the Whitelist contract is a clear example, since it is within the TradeManager file, which is quite confusing. The Ownable contract is not used throughout the project, so it is advisable to remove this file from the directory’s tree.

Reg0x commented 3 years ago

https://github.com/Solidity-Jobs/S-Token/blob/44363c599da7b19ee922be33816edbeacffa2139/TradeManager.sol#

Reg0x commented 3 years ago

https://github.com/Solidity-Jobs/S-Token/blob/44363c599da7b19ee922be33816edbeacffa2139/TradeManager.sol#