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!
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.
-
Run the
init
command forscripts.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)
-
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 ...
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.
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 files have a line break for each new sentence to make diff tracking easier.
Documentation markdown source files are at doc/doc-site/docs
.
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.