@solidstate/abdk-math-extensions
v1.2.2
Published
Solidstate extensions for the ABDK Solidity libraries
Maintainers
Readme
Solidstate Extensions for ABDK Libraries
Solidstate extensions for the abdk-libraries-solidity package. Developed as a part of the Premia Finance smart contracts.
Note: Solidstate, Premia, and this package are not affiliated with ABDK.
Installation
Install the package as well as the required ABDK package as development dependencies:
pnpm add -D @solidstate/abdk-math-extensions abdk-libraries-solidityDevelopment
Install dependencies:
pnpm installSetup Husky to format code on commit:
pnpm prepareCompile contracts via Hardhat:
pnpm hardhat compileThe Hardhat environment relies on the following environment variables. The dotenv package will attempt to read them from the .env file, if it is present.
| Key | Description |
| ------------ | ------------------------------------------------------------- |
| REPORT_GAS | if true, a gas report will be generated after running tests |
Networks
By default, Hardhat uses the Hardhat Network in-process. Two additional networks, mainnet and testnet are available, and their behavior is determined by the configuration of environment variables.
Testing
Test contracts via Hardhat:
pnpm hardhat testActivate gas usage reporting by setting the REPORT_GAS environment variable to "true":
REPORT_GAS=true pnpm hardhat testGenerate a code coverage report using solidity-coverage:
pnpm hardhat coverage