Git Product home page Git Product logo

ao-pilot's Introduction

IO/AO Contract

codecov

This repository contains the IO contract implementation on AO.

Components

  • Arweave Name System (ArNS) Registry - Core process code for the Arweave Name System Registry. It handles name registrations, updates, and queries within the ArNS framework.
  • Gateway Registry - Lua module that handles the registration and management of AR.IO Gateways.
  • Balances - Lua module that manages the balances of IO token holders.

Developers

Requirements

Lua Setup

  1. Clone the repository and navigate to the project directory.

  2. Install lua

  3. Add the following to your .zshrc or .bashrc file:

    echo 'export LDFLAGS="-L/usr/local/opt/[email protected]/lib"' >> ~/.zshrc
    echo 'export CPPFLAGS="-I/usr/local/opt/[email protected]/include"' >> ~/.zshrc
    echo 'export PKG_CONFIG_PATH="/usr/local/opt/[email protected]/lib/pkgconfig"' >> ~/.zshrc
    echo 'export PATH="/usr/local/opt/[email protected]/bin:$PATH"' >> ~/.zshrc
  4. Run source ~/.zshrc or source ~/.bashrc to apply the changes.

  5. Run lua -v to verify the installation.

Luarocks Setup

  1. Install luarocks

    curl -R -O http://luarocks.github.io/luarocks/releases/luarocks-3.9.1.tar.gz
    tar zxpf luarocks-3.9.1.tar.gz
    cd luarocks-3.9.1
    ./configure --with-lua=/usr/local/opt/[email protected] --with-lua-include=/usr/local/opt/[email protected]/include
    make build
    sudo make install
  2. Check the installation by running luarocks --version.

  3. Check the luarocks configuration by running luarocks config | grep LUA

If you ever need to refresh .luarocks, run the following command:

luarocks purge && luarocks install ar-io-ao-0.1-1.rockspec

aos

To load the module into the aos REPL, run the following command:

aos --load contract/src/main.lua

Code Formatting

The code is formatted using stylua. To install stylua, run the following command:

cargo install stylua
stylua contract

Testing

To run the tests, execute the following command:

busted .

To see the test coverage, run the following command:

luacov --reporter html && open luacov-html/index.html

Dependencies

To add new dependencies, install using luarocks to the local directory

luarocks install <package>

And add the package to the dependencies table in the ar-io-ao-0.1-1.rockspec file.

    -- rest of the file
    dependencies = {
        "lua >= 5.3",
        "luaunit >= 3.3.0",
        "<package>"
    }

Deployment

TODO:

ao-pilot's People

Contributors

vilenarios avatar dtfiedler avatar

Stargazers

AdamLee avatar Dylan Shade avatar murat onur avatar cedric karungu avatar 玄览至清 avatar codingsh avatar Anar Aydinli avatar witt avatar chenke avatar Anthony avatar Marton Lederer avatar Pawan Paudel avatar Mehmet Köl Tiğin avatar

Watchers

David Whittington avatar Steven Yi avatar Hlöðver Sigurðsson avatar  avatar  avatar codingsh avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.