🧪 Build & Test

Build & Test

This section explains how developers can build, test, and validate MALGIST smart contracts using a modern Ethereum development workflow.

MALGIST contracts are developed with Foundry, focusing on correctness, modularity, and audit readiness.


Development Setup (Foundry)

MALGIST uses Foundry as the primary development and testing framework.

Requirements

  • Git

  • Foundry (forge, cast, anvil)

  • Node.js (optional, for frontend integration)

Install Foundry

curl -L https://foundry.paradigm.xyz | bash
foundryup

Clone Repository

git clone https://github.com/malgist/malgist-contract.git
cd malgist-contract

Build Contracts

This compiles all core contracts, adapters, and interfaces.


Testing Philosophy

MALGIST follows a risk-first testing approach, focusing on critical paths where user funds are involved.

Testing Focus Areas

  • Vault deposit and withdrawal logic

  • Strategy execution correctness

  • Adapter isolation and safety

  • Permission and access control

  • Failure and revert scenarios

Test Characteristics

  • Deterministic unit tests

  • Minimal external assumptions

  • Clear separation between core logic and adapters

  • Explicit revert expectations

Run tests with:


Local Simulation

Developers can simulate execution locally using Anvil.

This enables:

  • Strategy execution dry-runs

  • Adapter behavior testing

  • Frontend or script-based interaction


Audit Readiness

While MALGIST is under active development, the codebase is structured with future audits in mind.

Audit-Oriented Practices

  • Modular contracts with small surface area

  • Explicit interfaces and adapters

  • No hidden custody or off-chain execution

  • Clear trust boundaries

Current Status

  • Internal testing completed

  • Public testnet deployments available

  • External audits planned post-hackathon

⚠️ Contracts are provided as-is during the hackathon phase and are intended for testing and demonstration purposes only.


Developer Notes

  • Adapters are intentionally isolated for easier auditing

  • Strategies do not directly interact with external protocols

  • All external calls flow through whitelisted adapters


➡️ Next: Roadmap — current status, near-term milestones, and long-term vision for MALGIST.

Last updated