1.0.0 • Published 2 years ago

@solidstate/abdk-math-extensions v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

SolidState Extensions for ABDK Libraries

SolidState extensions for the abdk-libraries-solidity package. Developed as a part of the Premia Finance smart contracts. SolidState, Premia, and this package are not affiliated with ABDK.

Installation

Install the package as well as the required ABDK package as development dependencies:

yarn add --dev @solidstate/abdk-math-extensions abdk-libraries-solidity

Development

Install dependencies via Yarn:

yarn install

Setup Husky to format code on commit:

yarn prepare

Compile contracts via Hardhat:

yarn run hardhat compile

The Hardhat environment relies on the following environment variables. The dotenv package will attempt to read them from the .env file, if it is present.

KeyDescription
REPORT_GASif 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:

yarn run hardhat test

Activate gas usage reporting by setting the REPORT_GAS environment variable to "true":

REPORT_GAS=true yarn run hardhat test

Generate a code coverage report using solidity-coverage:

yarn run hardhat coverage