Omniscia PolyTrade Finance Audit
Compilation
Compilation
The project utilizes hardhat
as its development pipeline tool, containing an array of scripts coded in JavaScript.
To compile the project, the compile
command needs to be issued via the hardhat
CLI tool invoked via npx
:
npx hardhat compile
The hardhat
tool automatically selects Solidity version 0.8.4
based on the version specified within the hardhat.config.js
file.
The project contains discrepancies with regards to the Solidity version used only within its dependencies which can be safely ignored. The Polytrade Finance team has locked the pragma
statements to 0.8.4
, the same version utilized for our static analysis as well as optimizational review of the codebase.
During compilation with the hardhat
pipeline, no errors were identified that relate to the syntax or bytecode size of the contracts of the project.
We should note, however, that the hardhat.config.js
file specifies the optimizer
within its compilers
settings with a runs
value of 1000000
which is significantly high. Generally, the optimizer works better the lower the value is and not the other way around that most people think. As a result, we advise a value of 400
or 200
to be utilized.