Skip to content
forked from econia-labs/econia

Hyper-parallelized on-chain order book for the Aptos blockchain

License

Notifications You must be signed in to change notification settings

bogberry/econia

 
 

Repository files navigation

Econia

e·co·ni·a | /ə'känēə/

Hyper-parallelized on-chain order book for the Aptos blockchain

If you haven't already, consider checking out Econia Labs' Teach yourself Move on Aptos guide for some helpful background information!

Developing Econia

Shell scripts

The easiest way to develop Econia is with the provided zsh shell scripts at scripts.sh, and the fastest way to run these scripts is by adding the following function to your runtime configuration file (~/.zshrc):

# Pass all commands to scripts.sh file.
s() {source scripts.sh "$@"}

Now you will be able to run the provided scripts.sh commands simply by typing s.

git clone https://github.com/econia-exchange/econia.git
cd econia
s hello
Hello, Econia developer

See scripts.sh for more commands.

Environment setup

  1. Run the init command for scripts.sh:

    # You should see output like this if you have already initialized.
    s init
    Initializing developer environment
    brew already installed
    aptos already installed
    entr already installed
    poetry already installed
    shfmt already installed
    Installing Python package
    Installing dependencies from lock file
    
    No dependencies to install or update
    
    Installing the current project: econia (1.0.0)
  2. Now you should be able to run all Move tests:

    # Run all Move tests.
    s tm
    INCLUDING DEPENDENCY AptosFramework
    INCLUDING DEPENDENCY AptosStdlib
    INCLUDING DEPENDENCY MoveStdlib
    BUILDING Econia
    Running Move unit tests
    [ PASS    ] 0x0::tablist::test_destroy_empty_not_empty
    [ PASS    ] 0x0::tablist::test_iterate
    ...

Freeing up disk space

Installing all of the dependencies necessary to develop Econia can quickly take up disk space. To clean up cache files and intermediate artifacts, consider the following tools:

In particular, if using a Mac local Time Machine snapshots of intermediate artifacts may lead to excessive "purgable" disk space should substantial time pass between backups. It is possible to disable snapshots as mentioned in the support thread, but backing up to Time Machine should also help purge snapshots of intermediate artifacts, once the above tools are invoked.

Also consider deleting ~/.move from time to time.

Key filetypes for Econia developers

Move

Move source code is at src/move/econia.

Auto-generated module documentation files are at src/move/econia/doc.

When Econia development began, the initial developer of the Econia v4 protocol had not yet programmed in Rust (Move is implemented in Rust). Hence, in the absence of a formal style guide, Move code was formatted according to the opinionated PEP8 Python style guide. For future projects it is suggested that Move be formatted according to Rust guidelines, or ideally per a Move linter, and that format be consistent within a single codebase.

Markdown

Markdown files have a line break for each new sentence to make diff tracking easier. Documentation markdown source files are at doc/doc-site/docs.

Python

Econia comes with a Python package at src/python/build_scripts, used for assorted build scripting functionality. Most Python commands are called on by scripts.sh commands, with dependencies managed by Poetry.

About

Hyper-parallelized on-chain order book for the Aptos blockchain

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Move 79.1%
  • Rust 8.5%
  • Python 6.5%
  • PLpgSQL 2.8%
  • HCL 1.4%
  • TypeScript 0.7%
  • Other 1.0%