Home

Awesome

Huffmath • Testslicense solidity

<h3>

A math library implementation using Huff.

</h3>

What?

This repo contains smart contracts for simple math operations implemented using Huff. Though there are testcases implemened the contracts are not audited. Use at your own risk.

Requirements

The following will need to be installed in order to use this repo. Please follow the links and instructions.

Quickstart

  1. Clone this repo:
git clone https://github.com/PraneshASP/huff-math
cd huff-math
  1. Install dependencies

Once you've cloned and entered into your repository, you need to install the necessary dependencies. In order to do so, simply run:

forge install
  1. Build & Test

To build and test your contracts, you can run:

forge build
forge test

For more information on how to use Foundry, check out the Foundry Github Repository and the foundry-huff library repository.

Blueprint

lib
├─ forge-std — https://github.com/foundry-rs/forge-std
├─ foundry-huff — https://github.com/huff-language/foundry-huff
src
 ├─ Math.huff — Huff library for simple math operations (experimental)
 ├─ WadRayMath.huff - Optimized Huff library for high presicion math (upto 27 digit decimals)
test
 ├─ Math.t.huff
 └─ WadRayMath.t.huff

License

The Unlicense

Acknowledgements

TODO

Disclaimer

These smart contracts are being provided as is. No guarantee, representation or warranty is being made, express or implied, as to the safety or correctness of the user interface or the smart contracts. They have not been audited and as such there can be no assurance they will work as intended, and users may experience delays, failures, errors, omissions, loss of transmitted information or loss of funds. The creators are not liable for any of the foregoing. Users should proceed with caution and use at their own risk.