/huff-heap-sort

Heap Sort algorithm implemented in Huff

Primary LanguageSolidityMIT LicenseMIT

Huff Heap Sort

Heap Sort algorithm implemented in Huff.

Created for On-Chain Sorting Program Contest.

Requirements

Usage

  1. Clone or Fork this repository
git clone https://github.com/altugbakan/huff-heap-sort
cd huff-heap-sort
  1. Install dependencies
forge install
  1. Build and test contracts
forge build
forge test

This contract expects only one uint256[] dynamic array on calldata, encoded using Solidity calldata rules. It returns one uint256[] dynamic array on memory, encoded using Solidity memory rules.

You can test the script against the contest using

source .env
forge script script/ValidateProgram.s.sol --rpc-url $RPC_URL -vv

Acknowledgements

Disclaimer

This contract is not audited, use it at your own caution.