Giter VIP home page Giter VIP logo

ava-network's Introduction

Avalance development node

The Avalanche platform is a flexible, "enterprise-grade" blockchain framework that makes it easy to launch decentralized applications. Their website lists it as "the first decentralized smart contracts platform built for the scale of global finance, with near-instance transaction finality."

It's also just a really flexible system for building custom smart contracts controlled with an network API and highly customizable. It comprises 3 built-in blockchains and contains a network API that can control the operations of the blockchain.

This project contains a Dockerfile and a docker-compose.yml that allows you to run it locally for development purposes.

Quickstart

You can customize your avalanche config by editing the docker/node/avalanche-config.json file with any of the config flags listed in the Avalanche config flags document page.

Once you're satisfied, build your docker compose nodes using the command:

just container-build

Launch the network by running:

just container-up

In order to use the CLI, you must build it using yarn or npm. Make sure you have all of the dependencies with install:

npm install
## or
yarn install

Build the cli with the build command:

npm run build
## or
yarn build

Now you can use the CLI. To see all the options available, use the --help flag:

./bin/ava --help

To issue any commands that require a token (if api-auth-required is enabled), you must first fetch a token. A token can be fetched using the cli:

export AVA_TOKEN=`./bin/ava auth newToken --password "Please-change-me-to-1234" --quiet`

If you'd prefer not to set an environment variable, it can be passed in using the --token flag:

./bin/ava auth newToken --password "Please-change-me-to-1234\!"
"JWT_TOKEN_ISSUED_BY_AVALANCHE"
## Use the token
./bin/ava user list

Justfile

This project also uses justfile as a convenience. You can use the ./justfile commands just like the yarn or npm commands.

How it works

While developing locally a docker instance is launched and axios issues local commands (in lieu of the curl interface) to the instance. All of these options can be configured using the cli, but it all defaults to a local instance.

Contributing

ava is written in TypeScript as a monorepo. Single commands can be executed per-package using yarn workspaces.

Running the local container to build CLI options:

just container-build && just container-up

From there, in another terminal window you can develop the ava cli command while building it in development:

(cd packages/ava && yarn dev)

And finally in another terminal window, execute ava using the bin/ava binary:

# If you don't have AVA_TOKEN defined
export AVA_TOKEN=`./bin/ava auth newToken --password "Please-change-me-to-1234" --quiet`
./bin/ava user list

TODO:

  • Complete generateConfig command to enable flexible configuration by CLI
  • Add C chain CLI commands
  • Complete P chain CLI commands
  • Add X chain CLI commands
  • Investigate auto-generating options from source
  • Extend to be able to be launched using Kubernetes

ava-network's People

Contributors

auser avatar

Watchers

 avatar  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.