Skip to content

halotrade-zone/halotrade-contracts

Repository files navigation

The smart contracts for halotrade

CircleCI codecov

The automated market-maker on Aura network.

Prerequisites

Contracts

Name Description
halo_factory Handle the information related to pairs
halo_pair Containing a pair of assets
halo_router Containing the logic to facilitate multi-hop swap operations

Running these contracts

You will need Rust 1.66.0+ with wasm32-unknown-unknown target installed.

Build the contract

The contracts can be compiled using cargo

cargo build

with the optimizer is

optimizer_version = '0.12.11'

Build .wasm file stored in target/wasm32-unknown-unknown/release/<CONTRACT_NAME>.wasm --no-wasm-opt is suitable for development, explained below

Testing the contract

To run the tests for the contract, run the following command:

RUST_BACKTRACE=1 cargo unit-test

This will build the contract and run a series of tests to ensure that it functions correctly. The tests are defined in the ./tests directory.