denispaluca / algofuzz

AlgoFuzz - A property-based fuzzing tool for Algorand smart contracts

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AlgoFuzz

AlgoFuzz-logo

AlgoFuzz is a property-based fuzzing tool for Algorand smart contracts. The tool itself is a prototype written in python. Users are expected to modify and run the source code directly to be able to test it.

Prerequisites

Usage

  1. Start an Algorand local network with AlgoKit
    algokit localnet start

  2. Adjust the environment variables in the .env file for your localnet if they differ.

  3. Install all dependencies with poetry poetry install

  4. In the file property_test.py write your property tests inside evaluate using the ContractState to retrieve the global and local state. i.e:

    def evaluate(exec_account_address: str, contract: ContractState) -> bool:    
        return contract.get_global('nr_users') < 10
  5. Execute the program with arguments:
    poetry run start -h

About

AlgoFuzz - A property-based fuzzing tool for Algorand smart contracts


Languages

Language:Python 68.0%Language:Solidity 32.0%